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:
96a9d05
)
rewrite: do not even compare content types, if we don't have any
author
Heikki Levanto
<heikki@indexdata.dk>
Fri, 2 Aug 2013 12:21:54 +0000
(14:21 +0200)
committer
Heikki Levanto
<heikki@indexdata.dk>
Fri, 2 Aug 2013 12:21:54 +0000
(14:21 +0200)
the regex_match caused a segfault if we had no content-type in the
headers.
src/filter_http_rewrite.cpp
patch
|
blob
|
history
diff --git
a/src/filter_http_rewrite.cpp
b/src/filter_http_rewrite.cpp
index
6cdc57c
..
58243bf
100644
(file)
--- a/
src/filter_http_rewrite.cpp
+++ b/
src/filter_http_rewrite.cpp
@@
-275,6
+275,10
@@
void yf::HttpRewrite::Phase::rewrite_body(
{
if (*content_len == 0)
return;
+ if (!content_type) {
+ yaz_log(YLOG_LOG, "rewrite_body: null content_type, can not rewrite");
+ return;
+ }
std::list<Content>::const_iterator cit = content_list.begin();
for (; cit != content_list.end(); cit++)
{