SOLR-7339: Use GzipHandler instead of GzipFilter

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1717431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-12-01 13:23:08 +00:00
parent 0745c12a90
commit bf48cb639c
1 changed files with 10 additions and 0 deletions

View File

@ -49,6 +49,7 @@ import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.server.session.HashSessionIdManager;
import org.eclipse.jetty.servlet.BaseHolder;
import org.eclipse.jetty.servlet.FilterHolder;
@ -350,7 +351,16 @@ public class JettySolrRunner {
// for some reason, there must be a servlet for this to get applied
root.addServlet(Servlet404.class, "/*");
GzipHandler gzipHandler = new GzipHandler();
gzipHandler.setHandler(root);
gzipHandler.setMinGzipSize(2048);
gzipHandler.setCheckGzExists(false);
gzipHandler.setCompressionLevel(-1);
gzipHandler.setExcludedAgentPatterns(".*MSIE.6\\.0.*");
gzipHandler.setIncludedMethods("GET");
server.setHandler(gzipHandler);
}
/**