mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
The charset iso-8859-1 is added only if not explicitely mentioned
It was added all the time when * was missing, the RFC specifies it should only be added if it wasn't already present, though.
This commit is contained in:
parent
08fcb38a18
commit
2e787fed56
1 changed files with 5 additions and 1 deletions
|
@ -426,7 +426,11 @@ prioritize_charsets(AcceptCharsets) ->
|
|||
end, AcceptCharsets),
|
||||
case lists:keymember(<<"*">>, 1, AcceptCharsets2) of
|
||||
true -> AcceptCharsets2;
|
||||
false -> [{<<"iso-8859-1">>, 1000}|AcceptCharsets2]
|
||||
false ->
|
||||
case lists:keymember(<<"iso-8859-1">>, 1, AcceptCharsets2) of
|
||||
true -> AcceptCharsets2;
|
||||
false -> [{<<"iso-8859-1">>, 1000}|AcceptCharsets2]
|
||||
end
|
||||
end.
|
||||
|
||||
choose_charset(Req, State, []) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue