summaryrefslogtreecommitdiff
path: root/Lib/httplib.py
diff options
context:
space:
mode:
authorAlex Martelli <aleaxit@gmail.com>2003-11-02 16:51:38 +0000
committerAlex Martelli <aleaxit@gmail.com>2003-11-02 16:51:38 +0000
commit9f4ee31b20656def7f171cecbba53117a070e729 (patch)
tree42dc5d3fd4e0a7a0b1128eea78b46f6e51a7fd27 /Lib/httplib.py
parentc3d3347aa8d2dfc2e1902120d806b620f7948a83 (diff)
downloadcpython-git-9f4ee31b20656def7f171cecbba53117a070e729.tar.gz
fixed obvious bug in _send_header as per SF bug #831271
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r--Lib/httplib.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 9832e474f8..40fad26c87 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -726,9 +726,8 @@ class HTTPConnection:
def _send_request(self, method, url, body, headers):
# 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"]):
+ # more delicate because field names are case insensitive.
+ if 'host' in [k.lower() for k in headers]:
self.putrequest(method, url, skip_host=1)
else:
self.putrequest(method, url)