Skip to content

Commit

Permalink
More IPv6 fixing. This time in actual code (in the client).
Browse files Browse the repository at this point in the history
  • Loading branch information
bmk committed Nov 29, 2010
1 parent 5f1f1ee commit ad82371
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
16 changes: 11 additions & 5 deletions lib/inets/src/http_client/httpc_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -854,12 +854,18 @@ connect(SocketType, ToAddress,
inet6fb4 ->
Opts3 = [inet6 | Opts2],
case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of
{error, Reason} when ((Reason =:= nxdomain) orelse
(Reason =:= eafnosupport)) ->
{error, _Reason} = Error ->
Opts4 = [inet | Opts2],
http_transport:connect(SocketType, ToAddress, Opts4, Timeout);
Other ->
Other
case http_transport:connect(SocketType,
ToAddress, Opts4, Timeout) of
{error, _} ->
%% Reply with the "original" error
Error;
OK ->
OK
end;
OK ->
OK
end;
_ ->
Opts3 = [IpFamily | Opts2],
Expand Down
10 changes: 10 additions & 0 deletions lib/inets/src/inets_app/inets.appup.src
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@

{"%VSN%",
[
{"5.5",
[
{restart_application, inets}
]
},
{"5.4",
[
{restart_application, inets}
]
}
],
[
{"5.4",
[
{restart_application, inets}
]
},
{"5.4",
[
{restart_application, inets}
Expand Down
5 changes: 4 additions & 1 deletion lib/inets/test/httpc_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,11 @@ init_per_testcase(Case, Timeout, Config) ->
[{watchdog, Dog}, {local_server, Server} | TmpConfig2]
end,

%% httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT},
%% ["localhost", ?IPV6_LOCAL_HOST]}}]),

httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT},
["localhost", ?IPV6_LOCAL_HOST]}},
["localhost", ?IPV6_LOCAL_HOST]}},
{ipfamily, inet6fb4}]),

%% snmp:set_trace([gen_tcp]),
Expand Down

0 comments on commit ad82371

Please sign in to comment.