Commit b36b0a37 authored by ValeriyaSinevich's avatar ValeriyaSinevich Committed by Steve Dower

bpo-33663: Convert content length to string before putting to header (GH-7754)

parent e57f91a0
......@@ -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:
......
Convert content length to string before putting to header.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment