mirror of
https://github.com/python/cpython.git
synced 2025-10-02 21:25:24 +00:00
bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468)
(cherry picked from commit e96ba183c4
)
This commit is contained in:
parent
65dffe58dd
commit
b071a5e838
1 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue