[ 
https://issues.apache.org/jira/browse/SLING-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger closed SLING-226.
-----------------------------------

    Resolution: Fixed

Implemented in Rev. 618949.

Also updated the unit tests and javadoc to reflect the new modus operandi

> Fix Resource resolution from request path 
> ------------------------------------------
>
>                 Key: SLING-226
>                 URL: https://issues.apache.org/jira/browse/SLING-226
>             Project: Sling
>          Issue Type: Bug
>          Components: Resource
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> Currently resource resolution considers the request path - 
> HttpServletRequest.getPathInfo() - as a path starting to find extensions at 
> the end of the request, cutting off at dots and slashes until a resource may 
> be found, except for GET/HEAD requests, where no parts are cut off at slashes.
> This behaviour is not effective with respect to request paths containig dots 
> at different locations, such as /foo/bar/image.res/sample.jpg, here the check 
> on a GET/HEAD request goes for /foo/bar/image.res/sample.jpg and 
> /foo/bar/image.res/sample and fails, if the resource would be /foo/bar/image, 
> the extension res and the suffix /sample.jpg - and yes, we would also require 
> suffixes on GET/HEAD requests.
> I suggest we change this to only cut off at dots and for non-GET/HEAD request 
> go up one slash if dot splitting did not help, so for 
> /foo/bar/image.res/sample.jpg, this would be :
>      /foo/bar/image.res/sample.jpg
>      /foo/bar/image.res/sample
>      /foo/bar/image
>      /foo/bar   --  for nonGET/HEAD only

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to