diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java index 8da3f319b3f..64ef8398a63 100644 --- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java +++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java @@ -38,6 +38,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.solr.client.solrj.SolrRequest; import org.apache.solr.common.SolrException; +import org.apache.solr.common.annotation.SolrThreadSafe; import org.apache.solr.common.cloud.DocCollection; import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.common.params.CommonParams; @@ -62,6 +63,7 @@ import org.slf4j.LoggerFactory; import com.google.common.collect.ImmutableSet; // class that handle the '/v2' path +@SolrThreadSafe public class V2HttpCall extends HttpSolrCall { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private Api api; 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 9c1d3575629..04e71b6329c 100644 --- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java +++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java @@ -60,6 +60,7 @@ import org.apache.solr.client.solrj.impl.CloudSolrClient; import org.apache.solr.client.solrj.impl.HttpClientUtil; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; +import org.apache.solr.common.annotation.SolrThreadSafe; import org.apache.solr.common.cloud.Aliases; import org.apache.solr.common.cloud.ClusterState; import org.apache.solr.common.cloud.DocCollection; @@ -134,6 +135,7 @@ import static org.apache.solr.servlet.SolrDispatchFilter.Action.RETURN; /** * This class represents a call made to Solr **/ +@SolrThreadSafe public class HttpSolrCall { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @@ -414,14 +416,12 @@ public class HttpSolrCall { if (path.equals(req.getServletPath())) { // avoid endless loop - pass through to Restlet via webapp action = PASSTHROUGH; - SolrRequestInfo.getRequestInfo().setAction(action); - return; } else { // forward rewritten URI (without path prefix and core/collection name) to Restlet action = FORWARD; - SolrRequestInfo.getRequestInfo().setAction(action); - return; } + SolrRequestInfo.getRequestInfo().setAction(action); + return; } } @@ -1123,7 +1123,7 @@ public class HttpSolrCall { } @Override - public Enumeration getHeaderNames() { + public Enumeration getHeaderNames() { return getReq().getHeaderNames(); }