Fix HTTP compression precedence#6331
Merged
mjjbell merged 1 commit intoProject-OSRM:masterfrom Aug 25, 2022
Merged
Conversation
There is a bug in the deflate compression. Therefore, we do not want to select this in the default choice for HTTP response compression. Instead we revert back to the previous precedence, selecting gzip as the priority.
SiarheiFedartsou
approved these changes
Aug 25, 2022
| { | ||
| return http::deflate_rfc1951; | ||
| } | ||
| if (boost::icontains(header_value, "gzip")) |
Member
There was a problem hiding this comment.
AFAIR according to HTTP spec we should rely on order of encodings in accept-encoding header, i.e. if
Accept-Encoding: gzip, deflate
it means that gzip is preferred by client and if we support it we should use it.
Member
Author
There was a problem hiding this comment.
Well, right now the server's compression preference is the one that works 🙂
But yes, we should improve this. Another reason why it would be good to replace the custom HTTP server in osrm-routed
Member
There was a problem hiding this comment.
I didn't mean to do it now, it was just a note :)
SiarheiFedartsou
added a commit
that referenced
this pull request
Oct 14, 2022
This reverts commit c204360.
mattwigway
pushed a commit
to mattwigway/osrm-backend
that referenced
this pull request
Jul 20, 2023
There is a bug in the deflate compression. Therefore, we do not want to select this in the default choice for HTTP response compression. Instead we revert back to the previous precedence, selecting gzip as the priority.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
There is a bug in the deflate compression. Therefore, we do not want
to select this in the default choice for HTTP response compression.
Instead we revert back to the previous precedence, selecting gzip as
the priority.
Tasklist
Requirements / Relations
#6330