summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
diff options
context:
space:
mode:
authorValeriyaSinevich <valeriya.sinevich@phystech.edu>2018-06-18 21:17:53 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2018-06-18 21:17:53 (GMT)
commitb36b0a3765bcacb4dcdbf12060e9e99711855da8 (patch)
treec06d9cfd86b8a80fd0b50110182244a30f56bb32 /Lib/http/server.py
parente57f91a0f0d5700ec466c9dd0fd2d2b5323a5e76 (diff)
downloadcpython-b36b0a3765bcacb4dcdbf12060e9e99711855da8.zip
cpython-b36b0a3765bcacb4dcdbf12060e9e99711855da8.tar.gz
cpython-b36b0a3765bcacb4dcdbf12060e9e99711855da8.tar.bz2
bpo-33663: Convert content length to string before putting to header (GH-7754)
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index ea0e295..ca2dd50 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -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: