Skip to content

Commit

Permalink
Update server.py to catch 400 error
Browse files Browse the repository at this point in the history
This would stop the no header situation so catch it here.
  • Loading branch information
rockystone77 committed Jul 1, 2024
1 parent 1ff20b1 commit 271b865
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cheroot/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,12 @@ def parse_request(self):
'allowed bytes.',
)
return
except ValueError:
self.simple_response(
'400 Bad request',
'Invalid Content Header.',
)
return
else:
if not success:
return
Expand Down

0 comments on commit 271b865

Please sign in to comment.