Fix handle of 'http' atom in Headers, problem introduced in 357e7e11

This commit is contained in:
Badlop 2020-02-26 13:35:47 +01:00
parent 9c25d1024a
commit 00abf5d42c
1 changed files with 6 additions and 2 deletions

View File

@ -857,9 +857,13 @@ parse_urlencoded(<<>>, Last, Cur, _State) ->
parse_urlencoded(undefined, _, _, _) -> [].
apply_custom_headers(Headers, CustomHeaders) ->
M = maps:merge(maps:from_list(Headers),
{Doctype, Headers2} = case Headers -- [html] of
Headers -> {[], Headers};
Other -> {[html], Other}
end,
M = maps:merge(maps:from_list(Headers2),
maps:from_list(CustomHeaders)),
maps:to_list(M).
Doctype ++ maps:to_list(M).
% The following code is mostly taken from yaws_ssl.erl