From 96a9d0598df0722dc31117fd4559bb4b23a2225e Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Tue, 23 Jul 2013 10:56:29 +0200 Subject: [PATCH] More logging when deciding not to rewrite --- src/filter_http_rewrite.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index 8557a01..6cdc57c 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -284,13 +284,18 @@ void yf::HttpRewrite::Phase::rewrite_body( && regex_match(content_type, cit->content_re)) break; } - if (cit == content_list.end()) + if (cit == content_list.end()) { + yaz_log(YLOG_LOG,"rewrite_body: No content rule matched %s, not rewriting", + content_type ); return; + } int i; for (i = 0; i < *content_len; i++) - if ((*content_buf)[i] == 0) + if ((*content_buf)[i] == 0) { + yaz_log(YLOG_LOG,"rewrite_body: Looks like binary stuff, not rewriting"); return; // binary content. skip + } std::string content(*content_buf, *content_len); cit->parse(m_verbose, content, vars); -- 1.7.10.4