From c605c4fa408272f98b78e06577fb7c446b7ea2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 26 Oct 2011 04:07:08 +0200 Subject: Add 'Accept' header parsing Rework the cowboy_http_req:parse_header/2 function while I was at it. --- src/cowboy_http_protocol.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cowboy_http_protocol.erl') diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index b91101a..b0ee590 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -172,7 +172,7 @@ header({http_header, _I, 'Host', _R, _V}, Req, State) -> header({http_header, _I, 'Connection', _R, Connection}, Req=#http_req{headers=Headers}, State) -> Req2 = Req#http_req{headers=[{'Connection', Connection}|Headers]}, - {tokens, ConnTokens, Req3} + {ConnTokens, Req3} = cowboy_http_req:parse_header('Connection', Req2), ConnAtom = cowboy_http:connection_to_atom(ConnTokens), parse_header(Req3#http_req{connection=ConnAtom}, State); -- cgit v1.2.3