bpo-33663: Convert content length to string before putting to header … · python/cpython@8c19a44 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 8c19a44
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. |