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 expectations to go upsteam to ssl. So catch it here.
  • Loading branch information
rockystone77 authored Jul 1, 2024
1 parent 1ff20b1 commit aee74a8
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 aee74a8

Please sign in to comment.