-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix double compress when compression enabled and compressed file exists #8014
Conversation
If the handler has `.enable_compression` set and we use the pre-compressed .gz we would compress twice. The caller may not know if the `.gz` file exists or not or have a mixed use case where some files are pre-compressed and some are compressed on the fly based if they have limited storage fixes #8011
57a4c94
to
6c11675
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8014 +/- ##
=======================================
Coverage 97.46% 97.46%
=======================================
Files 107 107
Lines 32529 32548 +19
Branches 3790 3790
=======================================
+ Hits 31703 31722 +19
Misses 624 624
Partials 202 202
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Backport to 3.9: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 92655a5 on top of patchback/backports/3.9/92655a50987e8bdfb6241dabbedc4c3cc8f55272/pr-8014 Backporting merged PR #8014 into master
🤖 @patchback |
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 92655a5 on top of patchback/backports/3.10/92655a50987e8bdfb6241dabbedc4c3cc8f55272/pr-8014 Backporting merged PR #8014 into master
🤖 @patchback |
If the client makes a request for "/hello.txt.gz" and the handler enables compression, what should the expected response be? Is it intentional that that would still result in double compression? |
What do these changes do?
If the handler has
.enable_compression
set and we use the pre-compressed .gz we would compress twice. The caller may not know if the.gz
file exists or not or have a mixed use case where some files are pre-compressed and some are compressed on the fly based if they have limited storagefixes #8011
Are there changes in behavior for the user?
Files are no longer double compressed which is likely never the desired outcome
Related issue number
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.