aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-10-26 04:07:08 +0200
committerLoïc Hoguin <[email protected]>2011-10-26 04:07:08 +0200
commitc605c4fa408272f98b78e06577fb7c446b7ea2e7 (patch)
tree1f62ea2799c58138ed30c62383c62df8b580f627 /src/cowboy_http_protocol.erl
parent1a839954bb9f1e9d246680fe8f90304a563d1a9c (diff)
downloadcowboy-c605c4fa408272f98b78e06577fb7c446b7ea2e7.tar.gz
cowboy-c605c4fa408272f98b78e06577fb7c446b7ea2e7.tar.bz2
cowboy-c605c4fa408272f98b78e06577fb7c446b7ea2e7.zip
Add 'Accept' header parsing
Rework the cowboy_http_req:parse_header/2 function while I was at it.
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r--src/cowboy_http_protocol.erl2
1 files changed, 1 insertions, 1 deletions
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);