Skip to content

Commit

Permalink
don't overwrite content-length
Browse files Browse the repository at this point in the history
  • Loading branch information
0x67757300 committed Dec 15, 2023
1 parent 30677c9 commit 7a7a0d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "uHTTP"
version = "1.3.0"
version = "1.3.1"
description = "Pythonic web development"
authors = ["gus <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion uhttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ async def __call__(self, scope, receive, send):
except Response as early_response:
response = early_response

response.headers._update({'content-length': [len(response.body)]})
response.headers.setdefault('content-length', len(response.body))
response.headers._update({
'set-cookie': [
header.split(': ', maxsplit=1)[1]
Expand Down

0 comments on commit 7a7a0d9

Please sign in to comment.