Skip to content

Commit 271b865

Browse files
committed
Update server.py to catch 400 error
This would stop the no header situation so catch it here.
1 parent 1ff20b1 commit 271b865

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cheroot/server.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,12 @@ def parse_request(self):
732732
'allowed bytes.',
733733
)
734734
return
735+
except ValueError:
736+
self.simple_response(
737+
'400 Bad request',
738+
'Invalid Content Header.',
739+
)
740+
return
735741
else:
736742
if not success:
737743
return

0 commit comments

Comments
 (0)