Fix logic for separating port and host for IPv6 literal addresses

This commit is contained in:
Juhani Krekelä 2021-10-15 13:05:43 +03:00
parent e854fb1ad3
commit 81fb82479a
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ def proxy(sock, host):
elif b':' not in remote_host:
port = None
else:
remote_host, port = remote_host.rsplit(b':')
remote_host, port = remote_host.rsplit(b':', 1)
try:
port = int(port)
if port < 1 or port > 0xffff: raise ValueError