summaryrefslogtreecommitdiff
path: root/Lib/logging/handlers.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2017-11-19 18:36:17 +0000
committerGitHub <noreply@github.com>2017-11-19 18:36:17 +0000
commite96ba183c43ad6633b5d014b3dc57433e2802faf (patch)
treed07951cce5a03706ab70529a5823b98a2a6b9a24 /Lib/logging/handlers.py
parentb56becb373f01c7e285f028bde640f0864d0240e (diff)
downloadcpython-git-e96ba183c43ad6633b5d014b3dc57433e2802faf.tar.gz
bpo-30904: Removed duplicated Host: header. (#4465)
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r--Lib/logging/handlers.py4
1 files changed, 3 insertions, 1 deletions
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")