From 40717e3439ffff02c569fec505cd01ae041ac9b1 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Fri, 19 Apr 2013 03:30:35 +0000 Subject: [PATCH] SOLR-4716,SOLR-4584: SolrCloud request proxying does not work on Tomcat and perhaps other non Jetty containers. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1469672 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../src/java/org/apache/solr/servlet/SolrDispatchFilter.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 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 current replicable 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.java index 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 Filter os = con.getOutputStream(); // side effect: method is switched to POST try { 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 Filter os = resp.getOutputStream(); try { IOUtils.copyLarge(is, os); + os.flush(); } finally { IOUtils.closeQuietly(os); // TODO: I thought we weren't supposed to explicitly close servlet streams IOUtils.closeQuietly(is);