From fc02b7f767516116167fb98b28d69805e48dbd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 17 Sep 2012 00:21:33 +0200 Subject: Add the private add_header/3 function used by cowboy_protocol --- src/cowboy_protocol.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cowboy_protocol.erl') diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index 8ddd40d..9520667 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -205,8 +205,7 @@ header({http_header, _I, 'Connection', _R, Connection}, Req, parse_header(cowboy_req:set_connection(Connection, Req), State); header({http_header, _I, Field, _R, Value}, Req, State) -> Field2 = format_header(Field), - parse_header(Req#http_req{headers=[{Field2, Value}|Req#http_req.headers]}, - State); + parse_header(cowboy_req:add_header(Field2, Value, Req), State); %% The Host header is required in HTTP/1.1 and optional in HTTP/1.0. header(http_eoh, Req, State=#state{host_tokens=undefined, buffer=Buffer, transport=Transport}) -> -- cgit v1.2.3