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:
parent
68c1d886e5
commit
77b3562257
2 changed files with 11 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue