From f3c5881dd41ce121151079c8315c7b39c003ee73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20March=C3=A1n?= Date: Tue, 26 Jun 2012 12:52:03 -0400 Subject: Don't save parsed value in the Host header --- src/cowboy_http_protocol.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index ef87af7..f6c5a34 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -187,11 +187,11 @@ header({http_header, _I, 'Host', _R, RawHost}, Req=#http_req{ Port = default_port(Transport:name()), parse_header(Req#http_req{ host=Host, raw_host=RawHost3, port=Port, - headers=[{'Host', RawHost3}|Req#http_req.headers]}, State); + headers=[{'Host', RawHost}|Req#http_req.headers]}, State); {Host, RawHost3, Port} -> parse_header(Req#http_req{ host=Host, raw_host=RawHost3, port=Port, - headers=[{'Host', RawHost3}|Req#http_req.headers]}, State); + headers=[{'Host', RawHost}|Req#http_req.headers]}, State); {'EXIT', _Reason} -> error_terminate(400, State) end; -- cgit v1.2.3