[Python-checkins] bpo-30904: Removed duplicated Host: header. (#4465)
Vinay Sajip
webhook-mailer at python.org
Sun Nov 19 13:36:20 EST 2017
https://github.com/python/cpython/commit/e96ba183c43ad6633b5d014b3dc57433e2802faf
commit: e96ba183c43ad6633b5d014b3dc57433e2802faf
branch: master
author: Vinay Sajip <vinay_sajip at yahoo.co.uk>
committer: GitHub <noreply at github.com>
date: 2017-11-19T18:36:17Z
summary:
bpo-30904: Removed duplicated Host: header. (#4465)
files:
M Lib/logging/handlers.py
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index d1871acfa4b..974c089d40e 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -1180,7 +1180,9 @@ def emit(self, record):
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")
More information about the Python-checkins
mailing list