From bf5c2717bc49d82f6415536c7ff0be2e1d8361a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 5 Oct 2011 03:17:13 +0200 Subject: 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. --- include/http.hrl | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/http.hrl b/include/http.hrl index 2364daa..3178381 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -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. -- cgit v1.2.3