Issue #4765 - Review GzipHandler inside ServletContextHandler.

Restored IncludedGzipTest.
Fixed ServletContextHandler.relinkHandlers(), now excluding
the checks for GzipHandler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-04-14 12:39:19 +02:00
parent 013acca012
commit 509f5791ff
2 changed files with 1 additions and 4 deletions

View File

@ -248,10 +248,8 @@ public class ServletContextHandler extends ContextHandler
// 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)
{
@ -267,7 +265,6 @@ public class ServletContextHandler extends ContextHandler
if (getSecurityHandler() != null)
{
while (!(handler.getHandler() instanceof SecurityHandler) &&
!(handler.getHandler() instanceof GzipHandler) &&
!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
{

View File

@ -90,7 +90,7 @@ public class IncludedGzipTest
GzipHandler gzipHandler = new GzipHandler();
gzipHandler.setMinGzipSize(16);
tester.getServer().insertHandler(gzipHandler);
tester.getContext().insertHandler(gzipHandler);
tester.start();
}