bpo-33663: Convert content length to string before putting to header (GH-7754)
This commit is contained in:
parent
e57f91a0f0
commit
b36b0a3765
|
@ -474,7 +474,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
|
|||
})
|
||||
body = content.encode('UTF-8', 'replace')
|
||||
self.send_header("Content-Type", self.error_content_type)
|
||||
self.send_header('Content-Length', int(len(body)))
|
||||
self.send_header('Content-Length', str(len(body)))
|
||||
self.end_headers()
|
||||
|
||||
if self.command != 'HEAD' and body:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Convert content length to string before putting to header.
|
Loading…
Reference in New Issue