]> granicus.if.org Git - python/commitdiff
bpo-30904: Removed duplicated Host: header. (#4465)
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 19 Nov 2017 18:36:17 +0000 (18:36 +0000)
committerGitHub <noreply@github.com>
Sun, 19 Nov 2017 18:36:17 +0000 (18:36 +0000)
Lib/logging/handlers.py

index d1871acfa4ba594012971e6feb80fc7ef0576e94..974c089d40ec346eebd62dd063a232dcd4efd3c0 100644 (file)
@@ -1180,7 +1180,9 @@ class HTTPHandler(logging.Handler):
             i = host.find(":")
             if i >= 0:
                 host = host[:i]
-            h.putheader("Host", host)
+            # See issue #30904: putrequest call above already adds this header
+            # on Python 3.x.
+            # h.putheader("Host", host)
             if self.method == "POST":
                 h.putheader("Content-type",
                             "application/x-www-form-urlencoded")