diff options
author | Loïc Hoguin <[email protected]> | 2011-10-26 04:07:08 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-10-26 04:07:08 +0200 |
commit | c605c4fa408272f98b78e06577fb7c446b7ea2e7 (patch) | |
tree | 1f62ea2799c58138ed30c62383c62df8b580f627 /src/cowboy_http_websocket.erl | |
parent | 1a839954bb9f1e9d246680fe8f90304a563d1a9c (diff) | |
download | cowboy-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_websocket.erl')
-rw-r--r-- | src/cowboy_http_websocket.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_http_websocket.erl b/src/cowboy_http_websocket.erl index a5bc5f8..136160e 100644 --- a/src/cowboy_http_websocket.erl +++ b/src/cowboy_http_websocket.erl @@ -77,7 +77,7 @@ upgrade(ListenerPid, Handler, Opts, Req) -> %% @todo Upgrade is a list of products and should be parsed as such. -spec websocket_upgrade(#state{}, #http_req{}) -> {ok, #state{}, #http_req{}}. websocket_upgrade(State, Req) -> - {tokens, ConnTokens, Req2} + {ConnTokens, Req2} = cowboy_http_req:parse_header('Connection', Req), true = lists:member(<<"upgrade">>, ConnTokens), {WS, Req3} = cowboy_http_req:header('Upgrade', Req2), |