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 Version 2
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 (last modified by )
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/19335
Change History (2)
comment:1 by , 6 months ago
comment:2 by , 6 months ago
Description: | modified (diff) |
---|
https://github.com/django/django/pull/19335