Skip to content

Commit a168a3d

Browse files
committed
fix idna encoding for local unix socket
1 parent f18e3aa commit a168a3d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/hackney_connect.erl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ connect(Transport, Host, Port, Options, Dynamic) ->
3636
{host, Host},
3737
{port, Port},
3838
{dynamic, Dynamic}]),
39-
case create_connection(Transport, idna:utf8_to_ascii(Host), Port,
40-
Options, Dynamic) of
39+
40+
Host2 = case Transport of
41+
hackney_local_tcp -> Host;
42+
_ -> idna:utf8_to_ascii(Host)
43+
end,
44+
45+
case create_connection(Transport, Host2, Port, Options, Dynamic) of
4146
{ok, #client{request_ref=Ref}} ->
4247
{ok, Ref};
4348
Error ->

0 commit comments

Comments
 (0)