Opened 13 years ago
Closed 13 years ago
#17514 closed Cleanup/optimization (fixed)
GZip middleware lacks tests and sends compressed responses when larger than the original
Reported by: | Aaron Cannon | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Normal | Keywords: | gzip, tests |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The GZip middleware does not currently have any tests.
In addition, in some cases it is not efficient to send a compressed response when the data doesn't compress. After the data is compressed, a check should be performed to see if the compressed data is equal to or larger than the original data, and if so, the original data should be returned instead of the compressed data. This will save a minuscule amount of bandwidth, but it will also save the recipient from having to decompress data.
Attachments (2)
Change History (5)
by , 13 years ago
Attachment: | middleware_gzip_patch.diff added |
---|
by , 13 years ago
Attachment: | middleware_gzip_patch_with_docs.diff added |
---|
Same as the previous patch, except I updated the documentation as well. The old documentation did not accurately or comprehensively describe when GZip compression would be applied.
comment:2 by , 13 years ago
Owner: | changed from | to
---|
Patch.