cosmo
cosmo copied to clipboard
Fixed regular expressions to be able to handle prefixed pathes.
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/..