bpo-33663: Convert content length to string before putting to header … · python/cpython@8c19a44 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 8c19a44

miss-islingtonValeriyaSinevich

and

authored

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

(cherry picked from commit b36b0a3) Co-authored-by: ValeriyaSinevich valeriya.sinevich@phystech.edu

File tree

2 files changed

lines changed

2 files changed

lines changed

Lines changed: 1 addition & 1 deletion

Original file line number Diff line number Diff line change
@@ -466,7 +466,7 @@ def send_error(self, code, message=None, explain=None):
466 466 })
467 467 body = content.encode('UTF-8', 'replace')
468 468 self.send_header("Content-Type", self.error_content_type)
469 -self.send_header('Content-Length', int(len(body)))
469 +self.send_header('Content-Length', str(len(body)))
470 470 self.end_headers()
471 471
472 472 if self.command != 'HEAD' and body:

Lines changed: 1 addition & 0 deletions

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 +Convert content length to string before putting to header.