summaryrefslogtreecommitdiffstats
path: root/Lib/httplib.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-09-14 16:32:02 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-09-14 16:32:02 (GMT)
commit10e6e0e61a38d62979fb5270d2e19a235ba32bbe (patch)
treee92222d59609f2590c6af4ab55309c8c14f2cd0f /Lib/httplib.py
parent065a32f5508152a4d9781e611185c48ab46ed108 (diff)
downloadcpython-10e6e0e61a38d62979fb5270d2e19a235ba32bbe.zip
cpython-10e6e0e61a38d62979fb5270d2e19a235ba32bbe.tar.gz
cpython-10e6e0e61a38d62979fb5270d2e19a235ba32bbe.tar.bz2
Search from the end of the host/port combination to find the colon which
separates ip address from the port to accommodate ipv6 addresses.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r--Lib/httplib.py2
1 files changed, 1 insertions, 1 deletions
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 @@ class HTTPConnection:
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:])