From: Heikki Levanto Date: Tue, 23 Jul 2013 08:56:29 +0000 (+0200) Subject: More logging when deciding not to rewrite X-Git-Tag: v1.3.60~6 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=96a9d0598df0722dc31117fd4559bb4b23a2225e;p=metaproxy-moved-to-github.git More logging when deciding not to rewrite --- 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);