From b071a5e838a0e84c4e8a60448fbd40e8a7e5c882 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sun, 19 Nov 2017 11:16:17 -0800 Subject: bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468) (cherry picked from commit e96ba183c43ad6633b5d014b3dc57433e2802faf) --- Lib/logging/handlers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index daa71ab..11ebcf1 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") -- cgit v0.12