projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
http_client: disables HTTP redirect by default
[metaproxy-moved-to-github.git]
/
src
/
filter_http_rewrite.cpp
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;
}