[ 
https://issues.apache.org/jira/browse/SOLR-13941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976712#comment-16976712
 ] 

Uwe Schindler edited comment on SOLR-13941 at 11/18/19 5:16 PM:
----------------------------------------------------------------

Hi,
I do not see any serious problem in the embedded jetty, but there is actually 
one difference - which makes sense:

in web.xml the SolrDispatchFilter is mount to path "{{/\*}}" while in the 
embedded jetty it's just "{{\*}}". I have not much time to test it now, but 
maybe adding a "{{/}}" in the class here is enough to fix this:

https://github.com/apache/lucene-solr/blob/cf21340294a52ad764deac7b9cdd38d06cfbc3da/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java#L386

The reson for this is explained here and has to do with the servlet spec: 
https://bluxte.net/musings/2006/03/29/servletpath-and-pathinfo-servlet-api-weirdness/

Same applies for the debug servlet.


was (Author: thetaphi):
Hi,
I do not see any serious problem in the embedded jetty, but there is actually 
one difference - which makes sense:

in web.xml the SolrDispatchFilter is mount to path {{/\*}} while in the 
embedded jetty it's just {{\*}}. I have not much time to test it now, but maybe 
adding a "/" in the class here is enough to fix this:

https://github.com/apache/lucene-solr/blob/cf21340294a52ad764deac7b9cdd38d06cfbc3da/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java#L386

The reson for this is explained here and has to do with the servlet spec: 
https://bluxte.net/musings/2006/03/29/servletpath-and-pathinfo-servlet-api-weirdness/

Same applies for the debug servlet.

> Tests configure Jetty differently than when running via start.jar
> -----------------------------------------------------------------
>
>                 Key: SOLR-13941
>                 URL: https://issues.apache.org/jira/browse/SOLR-13941
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Jan Høydahl
>            Assignee: Uwe Schindler
>            Priority: Major
>
> Spinoff from SOLR-13905.
> There seems to be a slightly different configuration of our servlets when 
> Solr is run from command line and through Test-runner for our tests.
> This causes different behavior of {{httpRequest.getPathInfo}} and 
> {{httpRequest.getServletPath()}} in the two environments, making it hard to 
> depend on these in critical code paths, such as 
> [SolrDispatchFilter|https://github.com/apache/lucene-solr/blob/f07998fc234c81ff956a84ee508b85f8d573ef38/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java#L494-L499]
>  and AuditEvent.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to