mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Parse 'Connection' headers as a list of tokens
Replaces the 'Connection' interpretation in cowboy_http_protocol from raw value to the parsed value, looking for a single token matching close/keep-alive instead of the whole raw value (which could contain more than one token, for example with Firefox 6+ using websocket). Introduce the functions cowboy_http_req:parse_header/2 and /3 to semantically parse the header values and return a proper Erlang term.
This commit is contained in:
parent
9a775cce3c
commit
bf5c2717bc
5 changed files with 184 additions and 20 deletions
|
@ -58,6 +58,7 @@
|
|||
raw_qs = undefined :: undefined | binary(),
|
||||
bindings = undefined :: undefined | cowboy_dispatcher:bindings(),
|
||||
headers = [] :: http_headers(),
|
||||
p_headers = [] :: [any()], %% @todo Improve those specs.
|
||||
cookies = undefined :: undefined | http_cookies(),
|
||||
|
||||
%% Request body.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue