aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-03-19 23:57:23 +0100
committerLoïc Hoguin <[email protected]>2011-03-19 23:57:23 +0100
commit8085529f48dd3a19baf5a4218d462e0afcfedbf9 (patch)
tree38da256f9c02258f3ada42d559f0ffe30fe843bd /src
parentbd3a64631657b5095a2c22ea342c906c9c2aecae (diff)
downloadcowboy-8085529f48dd3a19baf5a4218d462e0afcfedbf9.tar.gz
cowboy-8085529f48dd3a19baf5a4218d462e0afcfedbf9.tar.bz2
cowboy-8085529f48dd3a19baf5a4218d462e0afcfedbf9.zip
Save the raw host string in the request.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_protocol.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index e2a2250..0c7c2c7 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -101,7 +101,8 @@ header({http_header, _I, 'Host', _R, Value}, Req=#http_req{path=Path,
%% things like url rewriting.
case cowboy_dispatcher:match(Host, Path, Dispatch) of
{ok, Handler, Opts, Binds} ->
- wait_header(Req#http_req{host=Host, bindings=Binds,
+ wait_header(Req#http_req{
+ host=Host, raw_host=Value2, bindings=Binds,
headers=[{'Host', Value2}|Req#http_req.headers]},
State#state{handler={Handler, Opts}});
{error, notfound, host} ->