From: Vinay Sajip Date: Sun, 19 Nov 2017 18:36:17 +0000 (+0000) Subject: bpo-30904: Removed duplicated Host: header. (#4465) X-Git-Tag: v3.7.0a3~140 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e96ba183c43ad6633b5d014b3dc57433e2802faf;p=python bpo-30904: Removed duplicated Host: header. (#4465) --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index d1871acfa4..974c089d40 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -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")