Skip to content

Commit

Permalink
Issue #4765 - Review GzipHandler inside ServletContextHandler.
Browse files Browse the repository at this point in the history
Restored IncludedGzipTest.
Fixed ServletContextHandler.relinkHandlers(), now excluding
the checks for GzipHandler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Apr 14, 2020
1 parent 013acca commit 509f579
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,8 @@ private void relinkHandlers()
// link session handler
if (getSessionHandler() != null)
{

while (!(handler.getHandler() instanceof SessionHandler) &&
!(handler.getHandler() instanceof SecurityHandler) &&
!(handler.getHandler() instanceof GzipHandler) &&
!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
{
Expand All @@ -267,7 +265,6 @@ private void relinkHandlers()
if (getSecurityHandler() != null)
{
while (!(handler.getHandler() instanceof SecurityHandler) &&
!(handler.getHandler() instanceof GzipHandler) &&
!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void setUp() throws Exception

GzipHandler gzipHandler = new GzipHandler();
gzipHandler.setMinGzipSize(16);
tester.getServer().insertHandler(gzipHandler);
tester.getContext().insertHandler(gzipHandler);
tester.start();
}

Expand Down

0 comments on commit 509f579

Please sign in to comment.