From 36f5cad875f9d3caf35ce1163be88c55d361d9e3 Mon Sep 17 00:00:00 2001 From: Thomas Broyer Date: Mon, 25 Jul 2022 15:59:21 +0200 Subject: [PATCH] Fix gzip encoding of responses in the CodeServer Also remove sessions' handling as they're not used there. --- .../java/com/google/gwt/dev/codeserver/WebServer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java index d6b333a1e1..273e63cf4f 100644 --- a/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java +++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java @@ -30,7 +30,6 @@ import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; -import org.eclipse.jetty.servlets.GzipFilter; import java.io.BufferedReader; import java.io.File; @@ -125,7 +124,7 @@ void start(final TreeLogger logger) throws UnableToCompleteException { connector.setReuseAddress(false); newServer.addConnector(connector); - ServletContextHandler newHandler = new ServletContextHandler(ServletContextHandler.SESSIONS); + ServletContextHandler newHandler = new ServletContextHandler(ServletContextHandler.GZIP); newHandler.setContextPath("/"); newHandler.addServlet(new ServletHolder(new HttpServlet() { @Override @@ -134,7 +133,6 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) handleRequest(request.getPathInfo(), request, response, logger); } }), "/*"); - newHandler.addFilter(GzipFilter.class, "/*", EnumSet.allOf(DispatcherType.class)); newServer.setHandler(newHandler); try { newServer.start();