mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Strip square brackets from IPv6 address.
This commit is contained in:
parent
82d0eecf42
commit
74a249e1a9
2 changed files with 10 additions and 3 deletions
|
@ -534,6 +534,8 @@ class HTTPConnection:
|
|||
host = host[:i]
|
||||
else:
|
||||
port = self.default_port
|
||||
if host[0] == '[' and host[-1] == ']':
|
||||
host = host[1:-1]
|
||||
self.host = host
|
||||
self.port = port
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue