From: Alex Martelli Date: Sun, 2 Nov 2003 16:51:38 +0000 (+0000) Subject: fixed obvious bug in _send_header as per SF bug #831271 X-Git-Tag: v2.3.3c1~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f4ee31b20656def7f171cecbba53117a070e729;p=thirdparty%2FPython%2Fcpython.git fixed obvious bug in _send_header as per SF bug #831271 --- diff --git a/Lib/httplib.py b/Lib/httplib.py index 9832e474f834..40fad26c874c 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)