mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Save the raw host string in the request.
This commit is contained in:
parent
bd3a646316
commit
8085529f48
2 changed files with 4 additions and 3 deletions
|
@ -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} ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue