Apache Solr open-source search software
SOLR-4716,SOLR-4584: SolrCloud request proxying does not work on Tomcat and perhaps other non Jetty containers.
Mark Robert Miller40717e3439ff
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex df45d2fb3a8..939a2afd470 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -222,6 +222,9 @@ Bug Fixes* SOLR-4661: Admin UI Replication details now correctly displays the currentreplicable generation/version of the master. (hossman)+* SOLR-4716,SOLR-4584: SolrCloud request proxying does not work on Tomcat and+ perhaps other non Jetty containers. (Po Rui, Yago Riveiro via Mark Miller)+Optimizations----------------------diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.javaindex ae8601247c9..e064a3933c4 100644--- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java+++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java@@ -448,6 +448,7 @@ public class SolrDispatchFilter implements Filteros = con.getOutputStream(); // side effect: method is switched to POSTtry {IOUtils.copyLarge(is, os);+ os.flush();} finally {IOUtils.closeQuietly(os);IOUtils.closeQuietly(is); // TODO: I thought we weren't supposed to explicitly close servlet streams@@ -470,6 +471,7 @@ public class SolrDispatchFilter implements Filteros = resp.getOutputStream();try {IOUtils.copyLarge(is, os);+ os.flush();} finally {IOUtils.closeQuietly(os); // TODO: I thought we weren't supposed to explicitly close servlet streamsIOUtils.closeQuietly(is);