mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-33663: Convert content length to string before putting to header (GH-7754)
This commit is contained in:
parent
e57f91a0f0
commit
b36b0a3765
2 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue