]> granicus.if.org Git - python/commitdiff
bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 19 Nov 2017 19:16:17 +0000 (11:16 -0800)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 19 Nov 2017 19:16:17 +0000 (19:16 +0000)
(cherry picked from commit e96ba183c43ad6633b5d014b3dc57433e2802faf)

Lib/logging/handlers.py

index daa71abd785bec0eb1d40d21c93b0b77c9359f15..11ebcf124c3f93575021babba45148920a38988e 100644 (file)
@@ -1183,7 +1183,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")