Skip to content

Commit

Permalink
Fix #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 committed Apr 27, 2017
1 parent 7088c72 commit de83b7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/yaws_api.erl
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 de83b7e

Please sign in to comment.