mirror of https://github.com/apache/lucene.git
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:
parent
0745c12a90
commit
bf48cb639c
|
@ -49,6 +49,7 @@ import org.eclipse.jetty.server.SecureRequestCustomizer;
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.ServerConnector;
|
import org.eclipse.jetty.server.ServerConnector;
|
||||||
import org.eclipse.jetty.server.SslConnectionFactory;
|
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.server.session.HashSessionIdManager;
|
||||||
import org.eclipse.jetty.servlet.BaseHolder;
|
import org.eclipse.jetty.servlet.BaseHolder;
|
||||||
import org.eclipse.jetty.servlet.FilterHolder;
|
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
|
// for some reason, there must be a servlet for this to get applied
|
||||||
root.addServlet(Servlet404.class, "/*");
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue