SF bug #1046855: httplib index out of range
This commit is contained in:
parent
3079391b8d
commit
4d03791632
|
@ -593,7 +593,7 @@ class HTTPConnection:
|
|||
host = host[:i]
|
||||
else:
|
||||
port = self.default_port
|
||||
if host[0] == '[' and host[-1] == ']':
|
||||
if host and host[0] == '[' and host[-1] == ']':
|
||||
host = host[1:-1]
|
||||
self.host = host
|
||||
self.port = port
|
||||
|
|
Loading…
Reference in New Issue