aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-09-17 00:21:33 +0200
committerLoïc Hoguin <[email protected]>2012-09-17 13:57:28 +0200
commitfc02b7f767516116167fb98b28d69805e48dbd23 (patch)
tree6bd0e7d822b3ac5a6f1401e54f7c1c53a06916ed /src/cowboy_protocol.erl
parent905083a7fddcc7680405c504a646da9a70e3059e (diff)
downloadcowboy-fc02b7f767516116167fb98b28d69805e48dbd23.tar.gz
cowboy-fc02b7f767516116167fb98b28d69805e48dbd23.tar.bz2
cowboy-fc02b7f767516116167fb98b28d69805e48dbd23.zip
Add the private add_header/3 function used by cowboy_protocol
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r--src/cowboy_protocol.erl3
1 files changed, 1 insertions, 2 deletions
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}) ->