diff options
author | Loïc Hoguin <[email protected]> | 2013-01-14 16:29:23 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-01-14 16:29:23 +0100 |
commit | 305e639feff66a413e17ed00ff48609c5abba85e (patch) | |
tree | 10cf3c49a61616237abff68279f7bbe7d9a04914 | |
parent | 8d690995085088a9af66b898b68abc0c9580ad01 (diff) | |
download | cowboy-305e639feff66a413e17ed00ff48609c5abba85e.tar.gz cowboy-305e639feff66a413e17ed00ff48609c5abba85e.tar.bz2 cowboy-305e639feff66a413e17ed00ff48609c5abba85e.zip |
Add Sec-Websocket-Protocol header parsing
-rw-r--r-- | src/cowboy_req.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index 973cc65..89758dd 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -458,6 +458,11 @@ parse_header(Name, Req, Default) when Name =:= <<"if-modified-since">>; Name =:= <<"if-unmodified-since">> -> parse_header(Name, Req, Default, fun cowboy_http:http_date/1); +parse_header(Name, Req, Default) when Name =:= <<"sec-websocket-protocol">> -> + parse_header(Name, Req, Default, + fun (Value) -> + cowboy_http:nonempty_list(Value, fun cowboy_http:token/2) + end); %% @todo Extension parameters. parse_header(Name, Req, Default) when Name =:= <<"transfer-encoding">> -> parse_header(Name, Req, Default, |