Skip to content

Commit

Permalink
Http headers should be [{binary(), iodata()}] when using cowboy. (bet…
Browse files Browse the repository at this point in the history
  • Loading branch information
define-null authored and cmullaparthi committed Jan 17, 2017
1 parent ae7dd7d commit 856b5c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/soap_cowboy_protocol.erl
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ make_response({ok, StatusCode, Headers, Body, Cowboy_req},

set_headers(Headers, Cowboy_req) ->
lists:foldl(fun({Name, Value}, R) ->
cowboy_req:set_resp_header(Name, Value, R)
cowboy_req:set_resp_header(to_binary(Name), Value, R)
end,
Cowboy_req, Headers).

to_binary(N) when is_binary(N) ->
N;
to_binary(N) when is_list(N) ->
erlang:list_to_binary(N).

0 comments on commit 856b5c4

Please sign in to comment.