Skip to content

Commit

Permalink
Fix erlyaws#306: ignore http_error tuples in yaws_api:fold_others/4
Browse files Browse the repository at this point in the history
When processing HTTP headers in yaws_api:fold_others/4, ignore
http_error tuples and other values that are not http_header tuples.
  • Loading branch information
vinoski authored and vladdu committed Jan 26, 2021
1 parent f409182 commit 599558d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/yaws_api.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,9 @@ fold_others(LowerHdr, Handler, Other, StartAcc) ->
is_binary(Hdr) -> binary_to_list(Hdr);
true -> Hdr
end),
Handler(HdrVal, HdrNm == LowerHdr, Acc)
Handler(HdrVal, HdrNm == LowerHdr, Acc);
(_, Acc) ->
Acc
end, StartAcc, Other).
erlang_header_name("cache-control") -> 'Cache-Control';
Expand Down

0 comments on commit 599558d

Please sign in to comment.