JcrResourceResolver2.map does not handle resource paths with fragments and queries correctly --------------------------------------------------------------------------------------------
Key: SLING-991 URL: https://issues.apache.org/jira/browse/SLING-991 Project: Sling Issue Type: Bug Components: JCR Resource Affects Versions: JCR Resource 2.0.4 Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: JCR Resource 2.0.6 The JcrResourceResolver2.map(HttpServletRequest, String) method does not handle any fragements and queries in the resource path correctly, when mapping from the internal path to the external URL. The intent of the map method is to take any string, which is prepared to act as a link URL and to map the resource path to a valid URL, which may be resovled by the resolve method. Any selectors, extension and suffix are correctly cut of the path to get the raw resource path to map. But fragments and queries are not handled correclty. Consider the following examples based on an existing resource /content/home: /content/home --> use as is, nothing to cut off /content/home.html --> cut off extension before mapping /content/home.sel.html --> cut off selector and extension before mapping /content/home.html/some/suffix --> cut off extension and suffix before mapping /content/home.html#sec1?a:b=1 --> cut off extension, fragment and query before mapping The last part is not being done currently, which is a problem and might leed to wrong mapping results, particularly if the query contains colons, which would result in wrong namespace mangling. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.