-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Response compression does not work when the Accept-Encoding: *
request header is used.
#12324
Comments
Legit bug. The But since the world of gzip + brotli + zstandard is now a reality, that kind of usage has fallen out of favor as the user-agent (client) can get a That, and when we have multiple encodings that the server can support, we currently don't have a way to configure for preferred encoding. I need to fix this Using |
As a work around until we fully support *, use a rewrite customiser that replaced the * with the servers preferred encoding |
@joakime should we support this only in the new compression handler? |
@gregw yes, I think that's a better place for supporting this issue. |
Accept-Encoding: *
request header is used.
The fix for this is has been started for the |
Merged Fixed in |
Jetty version(s)
Up to 12.0.x
Jetty Environment
core
Java version/vendor
(use: java -version)
Not relevant
OS type/version
Not relevant
Description
This doesn't really affect anything, but it is unexpected. According to RF9110 12.5.3,
However, the
HttpField
class'contains
method does not check for a lone*
character. So whenAccept-Encoding: *
is passed as a request header, theGzipHandler
'sgetDeflaterEntry
believes thatgzip
is not accepted, and returnsnull
.How to reproduce?
Run a simple web server with the
GzipHandler
installed, and send a request withAccept-Encoding: *
. The response will not contain theContent-Encoding: gzip
header, and the body will not be compressed.The text was updated successfully, but these errors were encountered: