diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-11-19 19:16:17 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-11-19 19:16:17 (GMT) |
commit | b071a5e838a0e84c4e8a60448fbd40e8a7e5c882 (patch) | |
tree | 205e5d5d375accc1868074f653eceb8c39ff01a4 | |
parent | 65dffe58dd062385024eacbe75a0fa59ec12a993 (diff) | |
download | cpython-b071a5e838a0e84c4e8a60448fbd40e8a7e5c882.zip cpython-b071a5e838a0e84c4e8a60448fbd40e8a7e5c882.tar.gz cpython-b071a5e838a0e84c4e8a60448fbd40e8a7e5c882.tar.bz2 |
bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468)
(cherry picked from commit e96ba183c43ad6633b5d014b3dc57433e2802faf)
-rw-r--r-- | Lib/logging/handlers.py | 4 |
1 files changed, 3 insertions, 1 deletions
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") |