[ https://issues.apache.org/jira/browse/SLING-968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed SLING-968. ----------------------------------- Resolution: Fixed Closing with committed unit test in Rev. 774897 > Fix support for exact virtual URL mappings > ------------------------------------------ > > Key: SLING-968 > URL: https://issues.apache.org/jira/browse/SLING-968 > Project: Sling > Issue Type: Improvement > Components: JCR Resource > Affects Versions: JCR Resource 2.0.4 > Reporter: Felix Meschberger > Assignee: Felix Meschberger > Fix For: JCR Resource 2.0.6 > > > The mapping specification below /etc/map allows for matching an exact URL by > using a sling:match property terminated with a $, as in: > /etc/map/http/some.host.80/path > +--- sling:match = "path$" > +--- sling:internalRedirect = "/some/path.html" > This setup would match requests to http://some.host/path exactly and works > well. The reverse mapping, though, is setup as: > /some/path.html --> http://some.host/path$ > which results in a StringOutOfBoundsException when trying to map the resource > path /some/path.html back to an URL. > The loader for /etc/map mappings should recognize such match patterns with > trailing $ and act as follows: > * Child nodes are not considered (since nothing will match after the $ > sign any way) > * For the revers mapping, the trailing $ sign is moved to the left hand > side as in : /some/path.html$ --> http://some.host/path -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.