-
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
GzipHandler Vary head should be configurable #5171
Comments
I also wonder if it is time to just drop the default configuration to exclude MSIE6. It is beyond wasteful to make literally billions of checks for user agent when that is only necessary to help an ancient broken browser. I'm not sure that just lying about the user-agent pattern is the correct thing to do? |
Alternately, in jetty-10, we could just entirely remove the User-Agent handling from GzipHandler. Instead we could have an optional rewrite and/or customiser that removes Accept-Encoding from MSIE6. We already have MsieSslRule, so in 10, let's replace that with MsieRule that does both the accept encoding fiddle and the ssl keep alive fiddle. Perhaps we should then have a msie module that depends on rewrite and mixes in this rule. |
+ Remove User-Agent handling from GzipHandler + Allow Vary header to be set + Create rewrite MsieRule to remove Accept-Encoding from IE<=6 Signed-off-by: Greg Wilkins <[email protected]>
+ improved comments Signed-off-by: Greg Wilkins <[email protected]>
* Issue #5171 Simplify GzipHandler user-agent handling + Remove User-Agent handling from GzipHandler + Allow Vary header to be set + Create rewrite MsieRule to remove Accept-Encoding from IE<=6 Signed-off-by: Greg Wilkins <[email protected]> * + Full implementation of HttpFields ensure + use for Vary field * + fixed checkstyle * + fixed test for merged header * + fixed javadoc * Issue #5171 Simplify GzipHandler user-agent handling + improved comments Signed-off-by: Greg Wilkins <[email protected]> * rename and testing after review
Jetty version
9.4.31
Description
The current implementation of the
GzipHandler
produces aVary
response header.It only has 2 possible values depending on User-Agent configuration.
Vary: Accept-Encoding, User-Agent
(if there are User-Agent configurations present in the GzipHandler)Vary: Accept-Encoding
(if there are no User-Agent configurations present in the GzipHandler)There has been an expressed interest in being able to configure the
Vary
header.At minimum, the ability to turn off the
User-Agent
portion, even if the User-Agent configurations are present on the GzipHandler.But it might make sense to just make that field entirely configurable with any value.
Perhaps even allowing a null value to mean don't produce the header at all.
The text was updated successfully, but these errors were encountered: