From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 19 Nov 2017 19:16:17 +0000 (-0800) Subject: bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468) X-Git-Tag: v3.6.4rc1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b071a5e838a0e84c4e8a60448fbd40e8a7e5c882;p=python bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468) (cherry picked from commit e96ba183c43ad6633b5d014b3dc57433e2802faf) --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index daa71abd78..11ebcf124c 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -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")