0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Rename cowboy_http:charset/2 to conneg/2 and use it for Accept-Encoding

Sorry I apparently used an outdated RFC when I was doing this.
This commit is contained in:
Loïc Hoguin 2011-11-04 10:38:04 +01:00
parent 68c1d886e5
commit 77b3562257
2 changed files with 11 additions and 10 deletions

View file

@ -219,12 +219,12 @@ parse_header(Name, Req, Default) when Name =:= 'Accept' ->
parse_header(Name, Req, Default) when Name =:= 'Accept-Charset' ->
parse_header(Name, Req, Default,
fun (Value) ->
cowboy_http:nonempty_list(Value, fun cowboy_http:charset/2)
cowboy_http:nonempty_list(Value, fun cowboy_http:conneg/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)
cowboy_http:list(Value, fun cowboy_http:conneg/2)
end);
parse_header(Name, Req, Default) when Name =:= 'Connection' ->
parse_header(Name, Req, Default,