Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to check ipv6 of a host behind HTTP CONNECT proxy #97

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/hackney_connect.erl
Expand Up @@ -189,11 +189,16 @@ do_connect(Host, Port, Transport, #client{options=Opts,
ConnectTimeout = proplists:get_value(connect_timeout, Opts, 8000),

%% handle ipv6
ConnectOpts1 = case hackney_util:is_ipv6(Host) of
true ->
[inet6 | ConnectOpts0];
false ->
ConnectOpts0
ConnectOpts1 = case Transport of
hackney_http_connect ->
ConnectOpts0;
_ ->
case hackney_util:is_ipv6(Host) of
true ->
[inet6 | ConnectOpts0];
false ->
ConnectOpts0
end
end,

ConnectOpts2 = case lists:keyfind(nodelay, 1, ConnectOpts1) of
Expand Down