Skip to content

Commit 1d5ae0b

Browse files
committed
getaddrinfo: Use 'idna' encoding for string host names
1 parent 00b3a39 commit 1d5ae0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uvloop/loop.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ cdef class Loop:
505505
raise TypeError('port must be a str, bytes or int')
506506

507507
if isinstance(host, str):
508-
host = host.encode()
508+
host = host.encode('idna')
509509
if host is not None:
510510
if not isinstance(host, bytes):
511511
raise TypeError('host must be a str or bytes')

0 commit comments

Comments
 (0)