commit | 10e6e0e61a38d62979fb5270d2e19a235ba32bbe | [log] [tgz] |
---|---|---|
author | Skip Montanaro <skip@pobox.com> | Tue Sep 14 16:32:02 2004 +0000 |
committer | Skip Montanaro <skip@pobox.com> | Tue Sep 14 16:32:02 2004 +0000 |
tree | e92222d59609f2590c6af4ab55309c8c14f2cd0f | |
parent | 065a32f5508152a4d9781e611185c48ab46ed108 [diff] [blame] |
Search from the end of the host/port combination to find the colon which separates ip address from the port to accommodate ipv6 addresses.
diff --git a/Lib/httplib.py b/Lib/httplib.py index a4102ea..2f117d8 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py
@@ -524,7 +524,7 @@ def _set_hostport(self, host, port): if port is None: - i = host.find(':') + i = host.rfind(':') if i >= 0: try: port = int(host[i+1:])