0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Add Sec-Websocket-Protocol header parsing

This commit is contained in:
Loïc Hoguin 2013-01-14 16:29:23 +01:00
parent 8d69099508
commit 305e639fef

View file

@ -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,