summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAlex Martelli <aleaxit@gmail.com>2003-11-09 16:41:38 (GMT)
committerAlex Martelli <aleaxit@gmail.com>2003-11-09 16:41:38 (GMT)
commit0c5b4ad8f2c83b8c7731731ae0ed48b95da9515e (patch)
treedbf526855070fb9ab4b70647172398cd40e90a5a /Lib
parent721b776175da4d5af1982deb99881eaabd07dba5 (diff)
downloadcpython-0c5b4ad8f2c83b8c7731731ae0ed48b95da9515e.zip
cpython-0c5b4ad8f2c83b8c7731731ae0ed48b95da9515e.tar.gz
cpython-0c5b4ad8f2c83b8c7731731ae0ed48b95da9515e.tar.bz2
fixed obvious bug in _send_header as per SF bug #831271
(same as commit of Sun Nov 2 to the release23-maint branch)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/httplib.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 9832e47..a6ab647 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -727,8 +727,7 @@ class HTTPConnection:
# If headers already contains a host header, then define the
# optional skip_host argument to putrequest(). The check is
# harder because field names are case insensitive.
- if 'Host' in (headers
- or [k for k in headers.iterkeys() if k.lower() == "host"]):
+ if 'host' in [k.lower() for k in headers]:
self.putrequest(method, url, skip_host=1)
else:
self.putrequest(method, url)