aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_http_req.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index fb126e5..1555a02 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -201,6 +201,7 @@ parse_header(Name, Req=#http_req{p_headers=PHeaders}) ->
%% @doc Default values for semantic header parsing.
-spec parse_header_default(http_header()) -> any().
parse_header_default('Accept') -> [];
+parse_header_default('Accept-Encoding') -> [];
parse_header_default('Connection') -> [];
parse_header_default(_Name) -> undefined.
@@ -214,6 +215,11 @@ parse_header(Name, Req, Default) when Name =:= 'Accept' ->
fun (Value) ->
cowboy_http:list(Value, fun cowboy_http:media_range/2)
end);
+parse_header(Name, Req, Default) when Name =:= 'Accept-Encoding' ->
+ parse_header(Name, Req, Default,
+ fun (Value) ->
+ cowboy_http:list(Value, fun cowboy_http:token_ci/2)
+ end);
parse_header(Name, Req, Default) when Name =:= 'Connection' ->
parse_header(Name, Req, Default,
fun (Value) ->