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:
2c02be2
)
filter_http_rewrite: don't crash if "Host" header is missing
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 1 Jul 2013 14:20:54 +0000
(16:20 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 1 Jul 2013 14:20:54 +0000
(16:20 +0200)
src/filter_http_rewrite.cpp
patch
|
blob
|
history
diff --git
a/src/filter_http_rewrite.cpp
b/src/filter_http_rewrite.cpp
index
bb03d67
..
d417f46
100644
(file)
--- a/
src/filter_http_rewrite.cpp
+++ b/
src/filter_http_rewrite.cpp
@@
-156,8
+156,12
@@
void yf::HttpRewrite::Phase::rewrite_reqline (mp::odr & o,
else
{
//TODO what about proto
+ const char *host = z_HTTP_header_lookup(hreq->headers, "Host");
+ if (!host)
+ return;
+
path += "http://";
- path += z_HTTP_header_lookup(hreq->headers, "Host");
+ path += host;
path += hreq->path;
}