Apache Lucene open-source search software
SOLR-350, for non-handler reqeusts, select core with 'String corename = request.getParameter("core");'
Ryan McKinley2181f52f6664
diff --git a/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java b/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.javaindex 7b1d3944d35..668ee32c202 100644--- a/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java+++ b/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java@@ -247,6 +247,18 @@ public class SolrDispatchFilter implements Filter// otherwise, let's ensure the core is in the SolrCore request attribute so// the servlet can retrieve itelse {+ // TEMP -- to support /admin multicore grab the core from the request+ // TODO -- for muticore /admin support, strip the corename from the path+ // and forward to the /admin jsp file+ // req.getRequestDispatcher( path ).forward( request, response );+ String corename = request.getParameter("core");+ if( corename != null ) {+ core = multicore.getCore( corename );+ if( core == null ) {+ throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,+ "Can not find core: '"+corename+"'" );+ }+ }req.setAttribute("org.apache.solr.SolrCore", core);}}