Skip to content
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

Merged

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Apr 13, 2020

Removed GzipHandler from ServletContextHandler.
Updated ServletContextHandlerTest.

Signed-off-by: Simone Bordet simone.bordet@gmail.com

Closes #4765.

Removed GzipHandler from ServletContextHandler.
Updated ServletContextHandlerTest.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet requested review from gregw and joakime April 13, 2020 12:55
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)
Copy link
Contributor

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);
Copy link
Contributor

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);

Copy link
Contributor

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>
@sbordet sbordet requested a review from gregw April 14, 2020 10:39
@sbordet sbordet merged commit 5bad85b into jetty-10.0.x Apr 14, 2020
@sbordet sbordet deleted the jetty-10.0.x-4765-gziphandler_servletcontexthandler branch April 14, 2020 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review GzipHandler inside ServletContextHandler
2 participants