Skip to content

Commit

Permalink
Fix bug in calculation of received headers
Browse files Browse the repository at this point in the history
This would manifest itself is the headers were sent in multiple
individual packets that were processed after each other, the calculation
for max header size would be wrong and Waitress would incorrectly return
RequestHeaderFieldsTooLarge.
  • Loading branch information
digitalresistor committed Apr 21, 2022
1 parent 905118c commit dacaeee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/waitress/parser.py
Expand Up @@ -103,7 +103,7 @@ def received(self, data):
# If the headers have ended, and we also have part of the body
# message in data we still want to validate we aren't going
# over our limit for received headers.
self.header_bytes_received += index
self.header_bytes_received = index
consumed = datalen - (len(s) - index)
else:
self.header_bytes_received += datalen
Expand Down

0 comments on commit dacaeee

Please sign in to comment.