-
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
Issue #4765 - Review GzipHandler inside ServletContextHandler. #4767
Issue #4765 - Review GzipHandler inside ServletContextHandler. #4767
Conversation
Removed GzipHandler from ServletContextHandler. Updated ServletContextHandlerTest. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Fixed test failures. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
/** | ||
* @param gzipHandler The {@link GzipHandler} to set on this context. | ||
*/ | ||
public void setGzipHandler(GzipHandler gzipHandler) |
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.
I think we should leave the get and set methods, but deprecate them. The implementation can be replaced by an insert handler call
@@ -90,7 +90,7 @@ public void setUp() throws Exception | |||
|
|||
GzipHandler gzipHandler = new GzipHandler(); | |||
gzipHandler.setMinGzipSize(16); | |||
tester.getContext().insertHandler(gzipHandler); | |||
tester.getServer().insertHandler(gzipHandler); |
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.
This is not the equivalent test. it should be tester.getContext().insertHandler(gzipHandler);
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.
perhaps test gzip in and outside of the context?
Fixed XML files. Restored ServletContextHandler.setGzipHandler() and deprecated it in case it's used from user's XML files. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Restored IncludedGzipTest. Fixed ServletContextHandler.relinkHandlers(), now excluding the checks for GzipHandler. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Removed GzipHandler from ServletContextHandler.
Updated ServletContextHandlerTest.
Signed-off-by: Simone Bordet simone.bordet@gmail.com
Closes #4765.