Skip to content

Commit e96ba18

Browse files
authored
bpo-30904: Removed duplicated Host: header. (#4465)
1 parent b56becb commit e96ba18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/logging/handlers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,9 @@ def emit(self, record):
11801180
i = host.find(":")
11811181
if i >= 0:
11821182
host = host[:i]
1183-
h.putheader("Host", host)
1183+
# See issue #30904: putrequest call above already adds this header
1184+
# on Python 3.x.
1185+
# h.putheader("Host", host)
11841186
if self.method == "POST":
11851187
h.putheader("Content-type",
11861188
"application/x-www-form-urlencoded")

0 commit comments

Comments
 (0)