[ 
https://issues.apache.org/jira/browse/SLING-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656627#action_12656627
 ] 

Felix Meschberger commented on SLING-778:
-----------------------------------------

To tackle the first problem the internal list should probably be ordered 
according to the mapping pattern length and duplicate path entries should be 
folded into a single entry list entry. Of the two options, the one with the 
"best" scheme/host/port match should be taken.

> ResourceResolver.map not taking best match into account
> -------------------------------------------------------
>
>                 Key: SLING-778
>                 URL: https://issues.apache.org/jira/browse/SLING-778
>             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.4
>
>
> Consider the configuration:
>      http/en.host.com -> [ /content/en, / ]
>      http/de.host.com -> [ /content/de, / ]
> Here a path /content/en/something is converted correctly to 
> http://en.host.com/something while a path /content/de/etwas is incorrectly 
> converted to http://en.host.com/content/de/etwas instead of 
> http://de.host.com/etwas.
> Two issues are related to this problem:
>    1. the map method should consider the mappings using a longest match 
> strategy instead of a first-match
>    2. If two mappings with the same length apply, the one with the best 
> scheme/host/port match should be used

-- 
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