You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by an...@apache.org on 2015/05/06 22:28:15 UTC
svn commit: r1678090 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/CHANGES.txt solr/core/
solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Author: anshum
Date: Wed May 6 20:28:15 2015
New Revision: 1678090
URL: http://svn.apache.org/r1678090
Log:
SOLR-7500: Remove pathPrefix from SolrDispatchFilter as Solr no longer runs as a part of a bigger webapp.(merge from trunk)
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_5x/solr/core/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1678090&r1=1678089&r2=1678090&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Wed May 6 20:28:15 2015
@@ -50,6 +50,10 @@ Upgrading from Solr 5.1
- Please refer to the "Enabling SSL" section in the Solr Reference Guide for complete details.
+* Support for pathPrefix has been completely removed from Solr. Since 5.0, Solr only officially
+ supported being run as a webapp but you could play around with the web.xml to have a path prefix.
+ That would no longer be true. See SOLR-7500 for more info.
+
Detailed Change List
----------------------
@@ -270,6 +274,9 @@ Other Changes
* SOLR-7102: bin/solr should activate cloud mode if ZK_HOST is set (Timothy Potter)
+* SOLR-7500: Remove pathPrefix from SolrDispatchFilter as Solr no longer runs as a part
+ of a bigger webapp. (Anshum Gupta)
+
================== 5.1.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java?rev=1678090&r1=1678089&r2=1678090&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java Wed May 6 20:28:15 2015
@@ -145,9 +145,6 @@ class HttpSolrCall {
// this lets you handle /update/commit when /update is a servlet
path += req.getPathInfo();
}
- if (solrDispatchFilter.pathPrefix != null && path.startsWith(solrDispatchFilter.pathPrefix)) {
- path = path.substring(solrDispatchFilter.pathPrefix.length());
- }
// check for management path
String alternate = cores.getManagementPath();
if (alternate != null && path.startsWith(alternate)) {
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1678090&r1=1678089&r2=1678090&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Wed May 6 20:28:15 2015
@@ -84,9 +84,6 @@ public class SolrDispatchFilter extends
log.info("SolrDispatchFilter.init()" + this.getClass().getClassLoader());
try {
- // web.xml configuration
- this.pathPrefix = config.getInitParameter( "path-prefix" );
-
Properties extraProperties = (Properties) config.getServletContext().getAttribute(PROPERTIES_ATTRIBUTE);
if (extraProperties == null)
extraProperties = new Properties();
@@ -192,41 +189,4 @@ public class SolrDispatchFilter extends
call.destroy();
}
}
-
- // TODO: Clean up - we don't need this anymore.
- //---------------------------------------------------------------------
- //---------------------------------------------------------------------
-
- /**
- * Set the prefix for all paths. This is useful if you want to apply the
- * filter to something other then /*, perhaps because you are merging this
- * filter into a larger web application.
- *
- * For example, if web.xml specifies:
- * <pre class="prettyprint">
- * {@code
- * <filter-mapping>
- * <filter-name>SolrRequestFilter</filter-name>
- * <url-pattern>/xxx/*</url-pattern>
- * </filter-mapping>}
- * </pre>
- *
- * Make sure to set the PathPrefix to "/xxx" either with this function
- * or in web.xml.
- *
- * <pre class="prettyprint">
- * {@code
- * <init-param>
- * <param-name>path-prefix</param-name>
- * <param-value>/xxx</param-value>
- * </init-param>}
- * </pre>
- */
- public void setPathPrefix(String pathPrefix) {
- this.pathPrefix = pathPrefix;
- }
-
- public String getPathPrefix() {
- return pathPrefix;
- }
}