From 8085529f48dd3a19baf5a4218d462e0afcfedbf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 19 Mar 2011 23:57:23 +0100 Subject: Save the raw host string in the request. --- src/cowboy_http_protocol.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cowboy_http_protocol.erl') 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} -> -- cgit v1.2.3