[
https://issues.apache.org/jira/browse/SOLR-8058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14790774#comment-14790774
]
Steve Rowe edited comment on SOLR-8058 at 9/16/15 5:31 PM:
-----------------------------------------------------------
Patch that fails without the exclude pattern fix. All Solr tests pass on
trunk, and manual testing works, including the old and new admin UIs.
The testing issue AFAICT is that
{{[HTTPServletRequest.getServletPath()|http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getServletPath--]}}
returns depends on the pattern used:
{quote}
Returns the part of this request's URL that calls the servlet. This path
starts with a "/" character and includes either the servlet name or a path to
the servlet, but does not include any extra path information or a query string.
Same as the value of the CGI variable SCRIPT_NAME.
This method will return an empty string ("") if the servlet used to process
this request was matched using the "/*" pattern.
{quote}
So in JettySolrRunner, the servlet path is returned as the empty string, but in
manual testing, it's not.
The attached patch matches exclude patterns against the concatenation of the
servlet path and all following path segments.
[~anshumg] pointed me to [http://stackoverflow.com/a/21046620], which explains
the situation well, with an example.
was (Author: steve_rowe):
Patch that fails without the exclude pattern fix. All Solr tests pass on
trunk, and manual testing works, including the old and new admin UIs.
The testing issue AFAICT is that
{{[HTTPServletRequest.getServletPath()|http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getServletPath--}}
returns depends on the pattern used:
{noformat}
Returns the part of this request's URL that calls the servlet. This path
starts with a "/" character and includes either the servlet name or a path to
the servlet, but does not include any extra path information or a query string.
Same as the value of the CGI variable SCRIPT_NAME.
This method will return an empty string ("") if the servlet used to process
this request was matched using the "/*" pattern.
{noformat}
So in JettySolrRunner, the servlet path is returned as the empty string, but in
manual testing, it's not.
The attached patch matches exclude patterns against the concatenation of the
servlet path and all following path segments.
[~anshumg] pointed me to [http://stackoverflow.com/a/21046620], which explains
the situation well, with an example.
> Collections that start with css*, js*, img*, and tpl* can't be accessed as
> they match the exclusion filter
> ----------------------------------------------------------------------------------------------------------
>
> Key: SOLR-8058
> URL: https://issues.apache.org/jira/browse/SOLR-8058
> Project: Solr
> Issue Type: Bug
> Affects Versions: 5.2, 5.2.1, 5.3, 5.3.1
> Reporter: Anshum Gupta
> Assignee: Anshum Gupta
> Priority: Blocker
> Attachments: SOLR-8058.patch, SOLR-8058.patch, SOLR-8058.patch
>
>
> Collections that match css*, js*, img*, and tpl* can't be reached as the SDF
> short circuits paths that match those regular expressions.
> It should have only short circuited exact matches for those directories i.e.
> \css/*,/js/*,/img/*,/tpl/* but that doesn't seem to be the case.
> Need to fix this regular expression so that the collection can be reached.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]