Skip to content

Commit 236f368

Browse files
author
omarkj
committed
Don't overwrite the Host header passed in by
the user.
1 parent fd2158b commit 236f368

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/hackney_client/hackney.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,7 @@ stop_async(Ref) ->
541541
host_header(#hackney_url{netloc=Netloc}, Headers) ->
542542
case proplists:get_value(<<"Host">>, Headers) of
543543
undefined -> Headers ++ [{<<"Host">>, Netloc}];
544-
_ -> lists:keyreplace(<<"Host">>, 1, Headers,
545-
{<<"Host">>, Netloc})
544+
_ -> Headers
546545
end.
547546

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

0 commit comments

Comments
 (0)