bpo-30904: Removed duplicated Host: header. (#4465)
This commit is contained in:
parent
b56becb373
commit
e96ba183c4
|
@ -1180,7 +1180,9 @@ class HTTPHandler(logging.Handler):
|
||||||
i = host.find(":")
|
i = host.find(":")
|
||||||
if i >= 0:
|
if i >= 0:
|
||||||
host = host[:i]
|
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":
|
if self.method == "POST":
|
||||||
h.putheader("Content-type",
|
h.putheader("Content-type",
|
||||||
"application/x-www-form-urlencoded")
|
"application/x-www-form-urlencoded")
|
||||||
|
|
Loading…
Reference in New Issue