You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2016/02/16 22:01:33 UTC

[1/2] lucene-solr git commit: SOLR-7339: Jetty 9.3 upgrade.

Repository: lucene-solr
Updated Branches:
  refs/heads/master a40118c9d -> 0bba33254


SOLR-7339: Jetty 9.3 upgrade.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0bba3325
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0bba3325
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0bba3325

Branch: refs/heads/master
Commit: 0bba332549a11d5c381efc93a66087999b6de210
Parents: 9184d52
Author: markrmiller <ma...@apache.org>
Authored: Tue Feb 16 14:40:28 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Feb 16 16:01:10 2016 -0500

----------------------------------------------------------------------
 lucene/ivy-versions.properties                       |  2 +-
 .../jetty-continuation-9.2.13.v20150730.jar.sha1     |  1 -
 .../jetty-continuation-9.3.6.v20151106.jar.sha1      |  1 +
 lucene/licenses/jetty-http-9.2.13.v20150730.jar.sha1 |  1 -
 lucene/licenses/jetty-http-9.3.6.v20151106.jar.sha1  |  1 +
 lucene/licenses/jetty-io-9.2.13.v20150730.jar.sha1   |  1 -
 lucene/licenses/jetty-io-9.3.6.v20151106.jar.sha1    |  1 +
 .../licenses/jetty-server-9.2.13.v20150730.jar.sha1  |  1 -
 .../licenses/jetty-server-9.3.6.v20151106.jar.sha1   |  1 +
 .../licenses/jetty-servlet-9.2.13.v20150730.jar.sha1 |  1 -
 .../licenses/jetty-servlet-9.3.6.v20151106.jar.sha1  |  1 +
 lucene/licenses/jetty-util-9.2.13.v20150730.jar.sha1 |  1 -
 lucene/licenses/jetty-util-9.3.6.v20151106.jar.sha1  |  1 +
 solr/CHANGES.txt                                     |  3 +++
 .../solr/client/solrj/embedded/JettySolrRunner.java  | 15 ++++++++++++---
 .../apache/solr/client/solrj/embedded/SSLConfig.java |  2 +-
 .../jetty-continuation-9.2.13.v20150730.jar.sha1     |  1 -
 .../jetty-continuation-9.3.6.v20151106.jar.sha1      |  1 +
 solr/licenses/jetty-deploy-9.2.13.v20150730.jar.sha1 |  1 -
 solr/licenses/jetty-deploy-9.3.6.v20151106.jar.sha1  |  1 +
 solr/licenses/jetty-http-9.2.13.v20150730.jar.sha1   |  1 -
 solr/licenses/jetty-http-9.3.6.v20151106.jar.sha1    |  1 +
 solr/licenses/jetty-io-9.2.13.v20150730.jar.sha1     |  1 -
 solr/licenses/jetty-io-9.3.6.v20151106.jar.sha1      |  1 +
 solr/licenses/jetty-jmx-9.2.13.v20150730.jar.sha1    |  1 -
 solr/licenses/jetty-jmx-9.3.6.v20151106.jar.sha1     |  1 +
 .../licenses/jetty-rewrite-9.2.13.v20150730.jar.sha1 |  1 -
 solr/licenses/jetty-rewrite-9.3.6.v20151106.jar.sha1 |  1 +
 .../jetty-security-9.2.13.v20150730.jar.sha1         |  1 -
 .../licenses/jetty-security-9.3.6.v20151106.jar.sha1 |  1 +
 solr/licenses/jetty-server-9.2.13.v20150730.jar.sha1 |  1 -
 solr/licenses/jetty-server-9.3.6.v20151106.jar.sha1  |  1 +
 .../licenses/jetty-servlet-9.2.13.v20150730.jar.sha1 |  1 -
 solr/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1 |  1 +
 .../jetty-servlets-9.2.13.v20150730.jar.sha1         |  1 -
 .../licenses/jetty-servlets-9.3.6.v20151106.jar.sha1 |  1 +
 solr/licenses/jetty-util-9.2.13.v20150730.jar.sha1   |  1 -
 solr/licenses/jetty-util-9.3.6.v20151106.jar.sha1    |  1 +
 solr/licenses/jetty-webapp-9.2.13.v20150730.jar.sha1 |  1 -
 solr/licenses/jetty-webapp-9.3.6.v20151106.jar.sha1  |  1 +
 solr/licenses/jetty-xml-9.2.13.v20150730.jar.sha1    |  1 -
 solr/licenses/jetty-xml-9.3.6.v20151106.jar.sha1     |  1 +
 solr/licenses/start.jar.sha1                         |  2 +-
 .../src/java/org/apache/solr/util/SSLTestConfig.java |  3 ++-
 44 files changed, 39 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/ivy-versions.properties
----------------------------------------------------------------------
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index fc64b6e..5bb6d04 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -231,7 +231,7 @@ org.codehaus.jackson.version = 1.9.13
 /org.codehaus.woodstox/woodstox-core-asl = 4.4.1
 /org.easymock/easymock = 3.0
 
-org.eclipse.jetty.version = 9.2.13.v20150730
+org.eclipse.jetty.version = 9.3.6.v20151106
 /org.eclipse.jetty/jetty-continuation = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-deploy = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-http = ${org.eclipse.jetty.version}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1 b/lucene/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 1ec8eb1..0000000
--- a/lucene/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f6bd4e6871ecd0a5e7a5e5addcea160cd73f81bb

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1 b/lucene/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..6e16eda
--- /dev/null
+++ b/lucene/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+a120bc737d2efc6ebf4a703325ee679aff181881

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-http-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-http-9.2.13.v20150730.jar.sha1 b/lucene/licenses/jetty-http-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 82cf4cc..0000000
--- a/lucene/licenses/jetty-http-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-23a745d9177ef67ef53cc46b9b70c5870082efc2

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-http-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-http-9.3.6.v20151106.jar.sha1 b/lucene/licenses/jetty-http-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..cd8fdfc
--- /dev/null
+++ b/lucene/licenses/jetty-http-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+c2bba60bc1f9fe5779ac20ab30232bf9a89d3e52

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-io-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-io-9.2.13.v20150730.jar.sha1 b/lucene/licenses/jetty-io-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 63657e6..0000000
--- a/lucene/licenses/jetty-io-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-7a351e6a1b63dfd56b6632623f7ca2793ffb67ad

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-io-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-io-9.3.6.v20151106.jar.sha1 b/lucene/licenses/jetty-io-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..b06088c
--- /dev/null
+++ b/lucene/licenses/jetty-io-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+09e59bde867e55d8c93cdd682d12317733ef5339

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-server-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-server-9.2.13.v20150730.jar.sha1 b/lucene/licenses/jetty-server-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index bd79a51..0000000
--- a/lucene/licenses/jetty-server-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5be7d1da0a7abffd142de3091d160717c120b6ab

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-server-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-server-9.3.6.v20151106.jar.sha1 b/lucene/licenses/jetty-server-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..e154577
--- /dev/null
+++ b/lucene/licenses/jetty-server-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+d9c43a1b20ede7e3c456237d71b4cce1dff5457a

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1 b/lucene/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 7e8e6cb..0000000
--- a/lucene/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5ad6e38015a97ae9a60b6c2ad744ccfa9cf93a50

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1 b/lucene/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..f28a4c2
--- /dev/null
+++ b/lucene/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+62c03d6c7203735d4e28e4e78e22df38152f01ef

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-util-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-util-9.2.13.v20150730.jar.sha1 b/lucene/licenses/jetty-util-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 3126efc..0000000
--- a/lucene/licenses/jetty-util-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-c101476360a7cdd0670462de04053507d5e70c97

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/lucene/licenses/jetty-util-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-util-9.3.6.v20151106.jar.sha1 b/lucene/licenses/jetty-util-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..48b6b12
--- /dev/null
+++ b/lucene/licenses/jetty-util-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+8721c8e670c11ea19005c567733453956b6243fc

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index cbc1997..027a5b2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -27,6 +27,7 @@ Carrot2 3.10.4
 Velocity 1.7 and Velocity Tools 2.0
 Apache UIMA 2.3.1
 Apache ZooKeeper 3.4.6
+Jetty 9.3.6.v20151106
 
 System Requirements
 ----------------------
@@ -257,6 +258,8 @@ Other Changes
 
 * SOLR-8529: Improve JdbcTest to not use plain assert statements (Kevin Risden, Joel Bernstein)
 
+* SOLR-7339: Upgrade Jetty to v9.3.6.v20151106. (Gregg Donovan, shalin, Mark Miller)
+
 ======================= 5.6.0 =======================
 
 New Features

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
index ba2aa10..02954c4 100644
--- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
+++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
@@ -49,12 +49,12 @@ 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;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.servlets.GzipFilter;
 import org.eclipse.jetty.util.component.LifeCycle;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
@@ -295,7 +295,7 @@ public class JettySolrRunner {
 
     // Initialize the servlets
     final ServletContextHandler root = new ServletContextHandler(server, config.context, ServletContextHandler.SESSIONS);
-    root.addFilter(GzipFilter.class, "*", EnumSet.of(DispatcherType.REQUEST));
+
     server.addLifeCycleListener(new LifeCycle.Listener() {
 
       @Override
@@ -350,7 +350,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(0);
+    gzipHandler.setCheckGzExists(false);
+    gzipHandler.setCompressionLevel(-1);
+    gzipHandler.setExcludedAgentPatterns(".*MSIE.6\\.0.*");
+    gzipHandler.setIncludedMethods("GET");
 
+    server.setHandler(gzipHandler);
   }
 
   /**
@@ -503,7 +512,7 @@ public class JettySolrRunner {
         throw new IllegalStateException("Jetty Connector is not open: " + 
                                         c.getLocalPort());
       }
-      protocol = c.getDefaultProtocol().equals("SSL-http/1.1")  ? "https" : "http";
+      protocol = c.getDefaultProtocol().startsWith("SSL")  ? "https" : "http";
       return new URL(protocol, c.getHost(), c.getLocalPort(), config.context);
 
     } catch (MalformedURLException e) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java
index 77bb759..2881279 100644
--- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java
+++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java
@@ -86,7 +86,7 @@ public class SSLConfig {
     if (sslConfig.getKeyStorePassword() != null)
       factory.setKeyStorePassword(sslConfig.getKeyStorePassword());
     if (sslConfig.getTrustStore() != null)
-      factory.setTrustStorePath(System.getProperty(sslConfig.getTrustStore()));
+      factory.setTrustStorePath(sslConfig.getTrustStore());
     if (sslConfig.getTrustStorePassword() != null)
       factory.setTrustStorePassword(sslConfig.getTrustStorePassword());
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 1ec8eb1..0000000
--- a/solr/licenses/jetty-continuation-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f6bd4e6871ecd0a5e7a5e5addcea160cd73f81bb

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..6e16eda
--- /dev/null
+++ b/solr/licenses/jetty-continuation-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+a120bc737d2efc6ebf4a703325ee679aff181881

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-deploy-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-deploy-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-deploy-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index de395a3..0000000
--- a/solr/licenses/jetty-deploy-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-54182b020f7b8d9083a59f34e0a2a3b649035d63

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-deploy-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-deploy-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-deploy-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..e65d127
--- /dev/null
+++ b/solr/licenses/jetty-deploy-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+8a4813aacd2dda3aa36b109d7fe338abdd413239

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-http-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-http-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-http-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 82cf4cc..0000000
--- a/solr/licenses/jetty-http-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-23a745d9177ef67ef53cc46b9b70c5870082efc2

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-http-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-http-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-http-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..cd8fdfc
--- /dev/null
+++ b/solr/licenses/jetty-http-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+c2bba60bc1f9fe5779ac20ab30232bf9a89d3e52

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-io-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-io-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-io-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 63657e6..0000000
--- a/solr/licenses/jetty-io-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-7a351e6a1b63dfd56b6632623f7ca2793ffb67ad

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-io-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-io-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-io-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..b06088c
--- /dev/null
+++ b/solr/licenses/jetty-io-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+09e59bde867e55d8c93cdd682d12317733ef5339

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-jmx-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-jmx-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-jmx-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 8239252..0000000
--- a/solr/licenses/jetty-jmx-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a2ebbbcb47ed98ecd23be550f77e8dadc9f9a800

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-jmx-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-jmx-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-jmx-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..f36781b
--- /dev/null
+++ b/solr/licenses/jetty-jmx-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+c96ec3bbee1e3ff277929e3aff2126de5b9748c1

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-rewrite-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-rewrite-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-rewrite-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index ed69fca..0000000
--- a/solr/licenses/jetty-rewrite-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5e5be7a2d37dcd8dfbb62861dbfb05b48bb7ba54

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-rewrite-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-rewrite-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-rewrite-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..7a5b5a7
--- /dev/null
+++ b/solr/licenses/jetty-rewrite-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+75f233e85377fa476f210423014bc8c20824e4c5

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-security-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-security-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-security-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 521977a..0000000
--- a/solr/licenses/jetty-security-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-cc7c7f27ec4cc279253be1675d9e47e58b995943

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-security-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-security-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-security-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..e7ad9b2
--- /dev/null
+++ b/solr/licenses/jetty-security-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+e44ffc80834a7f78a5b0ed15c54b875956772242

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-server-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-server-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-server-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index bd79a51..0000000
--- a/solr/licenses/jetty-server-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5be7d1da0a7abffd142de3091d160717c120b6ab

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-server-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-server-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-server-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..e154577
--- /dev/null
+++ b/solr/licenses/jetty-server-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+d9c43a1b20ede7e3c456237d71b4cce1dff5457a

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 7e8e6cb..0000000
--- a/solr/licenses/jetty-servlet-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5ad6e38015a97ae9a60b6c2ad744ccfa9cf93a50

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..f28a4c2
--- /dev/null
+++ b/solr/licenses/jetty-servlet-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+62c03d6c7203735d4e28e4e78e22df38152f01ef

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-servlets-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlets-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-servlets-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 298fa30..0000000
--- a/solr/licenses/jetty-servlets-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-23eb48f1d889d45902e400750460d4cd94d74663

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-servlets-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlets-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-servlets-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..2dd2d09
--- /dev/null
+++ b/solr/licenses/jetty-servlets-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+468c799c20b73de386b9de499ae1bb9cbbe7f559

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-util-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-util-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-util-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 3126efc..0000000
--- a/solr/licenses/jetty-util-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-c101476360a7cdd0670462de04053507d5e70c97

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-util-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-util-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-util-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..48b6b12
--- /dev/null
+++ b/solr/licenses/jetty-util-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+8721c8e670c11ea19005c567733453956b6243fc

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-webapp-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-webapp-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-webapp-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 2a45b60..0000000
--- a/solr/licenses/jetty-webapp-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-716b5cdea1e818cd0e36dfea791f620d49bd2d2a

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-webapp-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-webapp-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-webapp-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..0c9b5ea
--- /dev/null
+++ b/solr/licenses/jetty-webapp-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+9cf00a3b7b2c1b6e024bb687e3719e1b0ff9e899

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-xml-9.2.13.v20150730.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-xml-9.2.13.v20150730.jar.sha1 b/solr/licenses/jetty-xml-9.2.13.v20150730.jar.sha1
deleted file mode 100644
index 9e236b3..0000000
--- a/solr/licenses/jetty-xml-9.2.13.v20150730.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-9e17bdfb8c25d0cd377960326b79379df3181776

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/jetty-xml-9.3.6.v20151106.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-xml-9.3.6.v20151106.jar.sha1 b/solr/licenses/jetty-xml-9.3.6.v20151106.jar.sha1
new file mode 100644
index 0000000..8bc22f3
--- /dev/null
+++ b/solr/licenses/jetty-xml-9.3.6.v20151106.jar.sha1
@@ -0,0 +1 @@
+b22e22977ea6c08751f8c945bb0785c35f9db28a

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/licenses/start.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/start.jar.sha1 b/solr/licenses/start.jar.sha1
index 0283a35..f67c9f5 100644
--- a/solr/licenses/start.jar.sha1
+++ b/solr/licenses/start.jar.sha1
@@ -1 +1 @@
-e400e65c5217a25a1fa024e414700287e6c07a61
+1ea60b0f4e5f31b19c58471a6a616bac6699d75d

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bba3325/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java b/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
index 3981c91..8d626dc 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
@@ -34,6 +34,7 @@ import org.apache.http.impl.client.DefaultHttpClient;
 import org.apache.solr.client.solrj.embedded.SSLConfig;
 import org.apache.solr.client.solrj.impl.HttpClientConfigurer;
 import org.apache.solr.common.params.SolrParams;
+import org.eclipse.jetty.util.resource.Resource;
 import org.eclipse.jetty.util.security.CertificateUtils;
 
 public class SSLTestConfig extends SSLConfig {
@@ -81,7 +82,7 @@ public class SSLTestConfig extends SSLConfig {
   
   protected static KeyStore buildKeyStore(String keyStoreLocation, String password) {
     try {
-      return CertificateUtils.getKeyStore(null, keyStoreLocation, "JKS", null, password);
+      return CertificateUtils.getKeyStore(Resource.newResource(keyStoreLocation), "JKS", null, password);
     } catch (Exception ex) {
       throw new IllegalStateException("Unable to build KeyStore from file: " + keyStoreLocation, ex);
     }


[2/2] lucene-solr git commit: SOLR-8683: Always consume the full request on the server, not just in the case of an error.

Posted by ma...@apache.org.
SOLR-8683: Always consume the full request on the server, not just in the case of an error.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9184d52f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9184d52f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9184d52f

Branch: refs/heads/master
Commit: 9184d52f68b43a741238ad8798fb2cbdbe81cf27
Parents: a40118c
Author: markrmiller <ma...@apache.org>
Authored: Tue Feb 16 15:48:11 2016 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Tue Feb 16 16:01:10 2016 -0500

----------------------------------------------------------------------
 solr/CHANGES.txt                                |   3 +
 .../org/apache/solr/servlet/HttpSolrCall.java   |  29 +----
 .../apache/solr/servlet/SolrDispatchFilter.java | 107 +++++++++++--------
 3 files changed, 69 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9184d52f/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 828727f..cbc1997 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -172,6 +172,9 @@ Bug Fixes
 * SOLR-8578: Successful or not, requests are not always fully consumed by Solrj clients and we
   count on HttpClient or the JVM. (Mark Miller)
 
+* SOLR-8683: Always consume the full request on the server, not just in the case of an error.
+  (Mark Miller)
+
 Optimizations
 ----------------------
 * SOLR-7876: Speed up queries and operations that use many terms when timeAllowed has not been

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9184d52f/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index 7227a8b..d87eb69 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -621,13 +621,9 @@ public class HttpSolrCall {
     } finally {
       try {
         if (exp != null) {
-          try {
-            SimpleOrderedMap info = new SimpleOrderedMap();
-            int code = ResponseUtils.getErrorInfo(ex, info, log);
-            sendError(code, info.toString());
-          } finally {
-            consumeInput(req);
-          }
+          SimpleOrderedMap info = new SimpleOrderedMap();
+          int code = ResponseUtils.getErrorInfo(ex, info, log);
+          sendError(code, info.toString());
         }
       } finally {
         if (core == null && localCore != null) {
@@ -642,21 +638,6 @@ public class HttpSolrCall {
       response.sendError(code, message);
     } catch (EOFException e) {
       log.info("Unable to write error response, client closed connection or we are shutting down", e);
-    } finally {
-      consumeInput(req);
-    }
-  }
-
-  // when we send back an error, we make sure we read
-  // the full client request so that the client does
-  // not hit a connection reset and we can reuse the 
-  // connection - see SOLR-8453
-  private void consumeInput(HttpServletRequest req) {
-    try {
-      ServletInputStream is = req.getInputStream();
-      while (!is.isFinished() && is.read() != -1) {}
-    } catch (IOException e) {
-      log.info("Could not consume full client request", e);
     }
   }
 
@@ -743,10 +724,6 @@ public class HttpSolrCall {
       //else http HEAD request, nothing to write out, waited this long just to get ContentType
     } catch (EOFException e) {
       log.info("Unable to write response, client closed connection or we are shutting down", e);
-    } finally {
-      if (solrRsp.getException() != null) {
-        consumeInput(req);
-      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9184d52f/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
index baab3eb..7a0e4ef 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
@@ -19,6 +19,7 @@ package org.apache.solr.servlet;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
@@ -185,58 +186,76 @@ public class SolrDispatchFilter extends BaseSolrFilter {
   
   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain, boolean retry) throws IOException, ServletException {
     if (!(request instanceof HttpServletRequest)) return;
+    try {
 
-    if (cores == null || cores.isShutDown()) {
-      log.error("Error processing the request. CoreContainer is either not initialized or shutting down.");
-      throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
-          "Error processing the request. CoreContainer is either not initialized or shutting down.");
-    }
+      if (cores == null || cores.isShutDown()) {
+        log.error("Error processing the request. CoreContainer is either not initialized or shutting down.");
+        throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
+            "Error processing the request. CoreContainer is either not initialized or shutting down.");
+      }
 
-    AtomicReference<ServletRequest> wrappedRequest = new AtomicReference<>();
-    if (!authenticateRequest(request, response, wrappedRequest)) { // the response and status code have already been sent
-      return;
-    }
-    if (wrappedRequest.get() != null) {
-      request = wrappedRequest.get();
-    }
-    if (cores.getAuthenticationPlugin() != null) {
-      log.debug("User principal: {}", ((HttpServletRequest)request).getUserPrincipal());
-    }
+      AtomicReference<ServletRequest> wrappedRequest = new AtomicReference<>();
+      if (!authenticateRequest(request, response, wrappedRequest)) { // the response and status code have already been
+                                                                     // sent
+        return;
+      }
+      if (wrappedRequest.get() != null) {
+        request = wrappedRequest.get();
+      }
+      if (cores.getAuthenticationPlugin() != null) {
+        log.debug("User principal: {}", ((HttpServletRequest) request).getUserPrincipal());
+      }
 
-    // No need to even create the HttpSolrCall object if this path is excluded.
-    if(excludePatterns != null) {
-      String requestPath = ((HttpServletRequest) request).getServletPath();
-      String extraPath = ((HttpServletRequest)request).getPathInfo();
-      if (extraPath != null) { // In embedded mode, servlet path is empty - include all post-context path here for testing 
-        requestPath += extraPath;
+      // No need to even create the HttpSolrCall object if this path is excluded.
+      if (excludePatterns != null) {
+        String requestPath = ((HttpServletRequest) request).getServletPath();
+        String extraPath = ((HttpServletRequest) request).getPathInfo();
+        if (extraPath != null) { // In embedded mode, servlet path is empty - include all post-context path here for
+                                 // testing
+          requestPath += extraPath;
+        }
+        for (Pattern p : excludePatterns) {
+          Matcher matcher = p.matcher(requestPath);
+          if (matcher.lookingAt()) {
+            chain.doFilter(request, response);
+            return;
+          }
+        }
       }
-      for (Pattern p : excludePatterns) {
-        Matcher matcher = p.matcher(requestPath);
-        if (matcher.lookingAt()) {
-          chain.doFilter(request, response);
-          return;
+
+      HttpSolrCall call = getHttpSolrCall((HttpServletRequest) request, (HttpServletResponse) response, retry);
+      ExecutorUtil.setServerThreadFlag(Boolean.TRUE);
+      try {
+        Action result = call.call();
+        switch (result) {
+          case PASSTHROUGH:
+            chain.doFilter(request, response);
+            break;
+          case RETRY:
+            doFilter(request, response, chain, true);
+            break;
+          case FORWARD:
+            request.getRequestDispatcher(call.getPath()).forward(request, response);
+            break;
         }
+      } finally {
+        call.destroy();
+        ExecutorUtil.setServerThreadFlag(null);
       }
+    } finally {
+      consumeInputFully((HttpServletRequest) request);
     }
-
-    HttpSolrCall call = getHttpSolrCall((HttpServletRequest) request, (HttpServletResponse) response, retry);
-    ExecutorUtil.setServerThreadFlag(Boolean.TRUE);
+  }
+  
+  // we make sure we read the full client request so that the client does
+  // not hit a connection reset and we can reuse the 
+  // connection - see SOLR-8453 and SOLR-8683
+  private void consumeInputFully(HttpServletRequest req) {
     try {
-      Action result = call.call();
-      switch (result) {
-        case PASSTHROUGH:
-          chain.doFilter(request, response);
-          break;
-        case RETRY:
-          doFilter(request, response, chain, true);
-          break;
-        case FORWARD:
-          request.getRequestDispatcher(call.getPath()).forward(request, response);
-          break;
-      }  
-    } finally {
-      call.destroy();
-      ExecutorUtil.setServerThreadFlag(null);
+      ServletInputStream is = req.getInputStream();
+      while (!is.isFinished() && is.read() != -1) {}
+    } catch (IOException e) {
+      log.info("Could not consume full client request", e);
     }
   }