-
-
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
Add server capability to check for Brotli compressed static files #8063
Conversation
I think this one should be safe for backport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Please see comments above
@bdraco I'd suggest this should only go to 3.10 backport. We try to stick to bug fixes in the patch releases. |
This comment was marked as resolved.
This comment was marked as resolved.
This reverts commit b0d58f7.
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <sviat@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blockers so far:
- new binary blob in Git
- formatting changes in tests
Please, deal with this to making this mergeable.
This reverts commit 634bf94.
Looks like all of my comments have been resolved so that leaves #8063 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, #8136 should merge first so it can be backported
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply dfc9296 on top of patchback/backports/3.10/dfc92967d10eb83a8d726c02c3de90da15f8335f/pr-8063 Backporting merged PR #8063 into master
🤖 @patchback |
@steverep looks like cherry-pick still has conflicts that need to be addressed manually. Please submit a backport PR per instructions above. |
…les (aio-libs#8063) Currently server only checks if static routes have a `.gz` extension and serves them with `gzip` encoding. These changes do the same for `.br` files with `br` encoding. Brotli is prioritized over gzip if both exist and are supported by the client, as it should almost always be a smaller content length. I considered making a check for which is smaller if both exist, but figured it wouldn't be worth the extra file system call in the vast majority of cases (at least not for typical web formats). Users should simply use gzip if it's smaller than Brotli for any file. Resolves aio-libs#8062 (cherry picked from commit dfc9296) Co-authored-by: Steve Repsher <steverep@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Sviatoslav Sydorenko <sviat@redhat.com>
What do these changes do?
Currently server only checks if static routes have a
.gz
extension and serves them withgzip
encoding. These changes do the same for.br
files withbr
encoding. Brotli is prioritized over gzip if both exist and are supported by the client, as it should almost always be a smaller content length.I considered making a check for which is smaller if both exist, but figured it wouldn't be worth the extra file system call in the vast majority of cases (at least not for typical web formats). Users should simply use gzip if it's smaller than Brotli for any file.
Are there changes in behavior for the user?
Only change would be if users are already including
.br
files, then obviously those would start being served, but IMO that's not "breaking" since the content should be the same.Related issue number
Fixes #8062
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.