projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
19a8cbd
)
More logging when deciding not to rewrite
author
Heikki Levanto
<heikki@indexdata.dk>
Tue, 23 Jul 2013 08:56:29 +0000
(10:56 +0200)
committer
Heikki Levanto
<heikki@indexdata.dk>
Tue, 23 Jul 2013 08:56:29 +0000
(10:56 +0200)
src/filter_http_rewrite.cpp
patch
|
blob
|
history
diff --git
a/src/filter_http_rewrite.cpp
b/src/filter_http_rewrite.cpp
index
8557a01
..
6cdc57c
100644
(file)
--- 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;
}
&& 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;
return;
+ }
int i;
for (i = 0; i < *content_len; i++)
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
return; // binary content. skip
+ }
std::string content(*content_buf, *content_len);
cit->parse(m_verbose, content, vars);
std::string content(*content_buf, *content_len);
cit->parse(m_verbose, content, vars);