We need some regression tests that verify that memory use is not excessive. A test structure that can measure peak memory usage perhaps and assert it remaining below a given threshold.
This is a non-exhaustive list of tests that need implementing:
Relating to HTTP parsing:
- Test very long request line
- Test very long response line
- Test very long header line
- Test many headers
- Test chunked long size line
- Test chunked long trailer line
- Test chunked many trailers
- Test BodyPartReaderPayload.write() with a large compressed payload
For multipart.py we need a similar list of tests specific to multipart requests.
Likely other tests that are useful elsewhere too.
On a side note, I wonder if the (buffer) limit always be a minimum of double the line limit, to ensure we don't pause the socket reading too much?
We need some regression tests that verify that memory use is not excessive. A test structure that can measure peak memory usage perhaps and assert it remaining below a given threshold.
This is a non-exhaustive list of tests that need implementing:
Relating to HTTP parsing:
For multipart.py we need a similar list of tests specific to multipart requests.
Likely other tests that are useful elsewhere too.
On a side note, I wonder if the (buffer) limit always be a minimum of double the line limit, to ensure we don't pause the socket reading too much?