Opened 6 months ago
Last modified 6 months ago
#36293 closed New feature
Add test to verify non-blocking behavior of compress_sequence() with zfile.flush() — at Initial Version
Reported by: | huoyinghui | Owned by: | |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Normal | Keywords: | gzip flush |
Cc: | Carlton Gibson, Matthew Somerville | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This ticket proposes adding a test to confirm that compress_sequence()
in django.utils.text
correctly flushes each chunk during gzip streaming.
The absence of zfile.flush()
would cause compressed output to be buffered,
delaying response delivery in streaming contexts. This test uses timed
chunk generation to verify that data is emitted approximately once per second,
indicating that gzip output is non-blocking when flush()
is used.
See related PR: https://github.com/django/django/pull/XXXXX