summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-10-14 15:23:38 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-10-14 15:23:38 (GMT)
commit4d03791632a9b7a6d96640df09466969aec81b71 (patch)
treea2f1732973fb11b8e9905e7614ca4803b2c31adb /Lib
parent3079391b8ded86351b47617663a9ae54b6fc7c66 (diff)
downloadcpython-4d03791632a9b7a6d96640df09466969aec81b71.zip
cpython-4d03791632a9b7a6d96640df09466969aec81b71.tar.gz
cpython-4d03791632a9b7a6d96640df09466969aec81b71.tar.bz2
SF bug #1046855: httplib index out of range
Diffstat (limited to 'Lib')
-rw-r--r--Lib/httplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index d4fcf7c..72e8a72 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -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