Skip to content

Commit aee74a8

Browse files
authored
Update server.py to catch 400 error
This would stop the no header situation expectations to go upsteam to ssl. So catch it here.
1 parent 1ff20b1 commit aee74a8

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)