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:
parent
8d69099508
commit
305e639fef
1 changed files with 5 additions and 0 deletions
|
@ -458,6 +458,11 @@ parse_header(Name, Req, Default)
|
||||||
when Name =:= <<"if-modified-since">>;
|
when Name =:= <<"if-modified-since">>;
|
||||||
Name =:= <<"if-unmodified-since">> ->
|
Name =:= <<"if-unmodified-since">> ->
|
||||||
parse_header(Name, Req, Default, fun cowboy_http:http_date/1);
|
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.
|
%% @todo Extension parameters.
|
||||||
parse_header(Name, Req, Default) when Name =:= <<"transfer-encoding">> ->
|
parse_header(Name, Req, Default) when Name =:= <<"transfer-encoding">> ->
|
||||||
parse_header(Name, Req, Default,
|
parse_header(Name, Req, Default,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue