lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1543097 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Date Mon, 18 Nov 2013 18:19:27 GMT
Author: markrmiller
Date: Mon Nov 18 18:19:26 2013
New Revision: 1543097

URL: http://svn.apache.org/r1543097
Log:
SOLR-5452: Parse params correctly.

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1543097&r1=1543096&r2=1543097&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Mon
Nov 18 18:19:26 2013
@@ -314,9 +314,9 @@ public class SolrDispatchFilter implemen
           // if we couldn't find it locally, look on other nodes
           if (core == null && idx > 0) {
             String coreUrl = getRemotCoreUrl(cores, corename, origCorename);
-            Map<String,String[]> params = req.getParameterMap();
             // don't proxy for internal update requests
-            if (coreUrl != null && (params == null || !params.containsKey(DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM)))
{
+            solrReq =  SolrRequestParsers.DEFAULT.parse(null,path, req);
+            if (coreUrl != null && solrReq.getParams().get(DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM)
== null) {
               path = path.substring( idx );
               remoteQuery(coreUrl + path, req, solrReq, resp);
               return;
@@ -500,9 +500,9 @@ public class SolrDispatchFilter implemen
       con.setRequestMethod(req.getMethod());
       con.setUseCaches(false);
       
-      boolean isPostRequest = "POST".equals(req.getMethod());
+      boolean isPostOrPutRequest = "POST".equals(req.getMethod()) || "PUT".equals(req.getMethod());
       
-      if (isPostRequest) {
+      if (isPostOrPutRequest) {
         con.setDoOutput(true);
       }
       con.setDoInput(true);
@@ -515,7 +515,7 @@ public class SolrDispatchFilter implemen
 
         InputStream is;
         OutputStream os;
-        if (isPostRequest) {
+        if (isPostOrPutRequest) {
           is = req.getInputStream();
           os = con.getOutputStream(); // side effect: method is switched to POST
           try {



Mime
View raw message