Fixed regular expressions to be able to handle prefixed pathes.#37
Fixed regular expressions to be able to handle prefixed pathes.#37k-oliver wants to merge 1 commit intomam-dev:masterfrom
Conversation
The regular expressions now can handle pathes like: /something/item/... /item/... /another/user/... /user /any/prefix/path/collection/..
|
Hi @k-oliver I had a look at your comments and also checked our application. If I assume correctly :
You say that you always get the full path in
How is it possible that you get the full path including application context and servlet context ? Thanks. |
|
Hi @danielgrigore , |
|
Hi @k-oliver I modified the demo cosmo-webapp to use jetty (9.4.19) instead of tomcat and decreased the Servlet API version from 4.0.1 to 3.10. In your situation is it possible to use an incorrect URL for getting the event ? From your message it seems that the incorrect URL might be something like |
Hi,
I'm using cosmo embedded in an OSGi enviroment where all servlets and filters are prefixed with pathes like /calendar. When using tickets the given path is used to find resources. This results in errors like this:
TicketedItemNotFoundException: Resource at /calendar/dav/item/99a0533b-0035-47f0-a6d1-acb96218811e not found
I tried different Spring solutions like adding Springs ForwardedHeaderFilter. But none worked because the finally the TicketProcessingFilter uses httpRequest.getPathInfo() which always gets the full path.
With this PR i suggest to make the path parsing using the resource pathes more tollerant by allowing prefixed pathes. This make tickets work again for me.
The regular expressions now can handle pathes like:
/something/item/...
/item/...
/another/user/...
/user
/any/prefix/path/collection/..