Skip to content

Commit

Permalink
Don't overwrite the Host header passed in by
Browse files Browse the repository at this point in the history
the user.
  • Loading branch information
omarkj committed Aug 12, 2014
1 parent fd2158b commit 236f368
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hackney_client/hackney.erl
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,7 @@ stop_async(Ref) ->
host_header(#hackney_url{netloc=Netloc}, Headers) ->
case proplists:get_value(<<"Host">>, Headers) of
undefined -> Headers ++ [{<<"Host">>, Netloc}];
_ -> lists:keyreplace(<<"Host">>, 1, Headers,
{<<"Host">>, Netloc})
_ -> Headers
end.

make_request(connect, #hackney_url{}=URL, Headers, Body, _, _) ->
Expand Down

0 comments on commit 236f368

Please sign in to comment.