[
https://issues.apache.org/jira/browse/SLING-3319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Edelson resolved SLING-3319.
-----------------------------------
Resolution: Not A Problem
As described in http://markmail.org/message/eshsevv7gqwr5p2r, this is not a bug.
If the provider root is /content/test/root, it should never be asked for
/content/test/root.html as that is not a child of /content/test/root.
> ResourceProvider does not receive selectors or extensions when root path is
> resolved.
> -------------------------------------------------------------------------------------
>
> Key: SLING-3319
> URL: https://issues.apache.org/jira/browse/SLING-3319
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: Resource Resolver 1.0.6
> Reporter: Olaf Otto
> Attachments: SLING-3319.patch
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> In order to find and sort ResourceProviders, the ResourceProviderEntry class
> from org.apache.sling.resourceprovider splits the request path into segments,
> subsequently traversing the segments to find provides with a root matching
> the entire path up to the current segment. However, The function
> split(String) of ResourceProviderEntry splits by "/", thus resulting in the
> last segment containing any selectors and extensions of the current path,
> like so:
> /content/test/root.html -> [content, test, root.html].
> Thus a provider with a root path of /content/test/root is not found. The next
> iteration in ResourceResolver# resolveInternal(String absPath) will then
> provide /content/test/root to the ResourceProviderEntry. The provider is thus
> found, but invoked with /content/test/root (without any extensions or
> selectors).
> However when requesting a child resource:
> /content/test/root.html -> [content, test, root, child.html]
> the provider for root is found and thus invoked with
> /content/test/root/child.html , i.e. including any selectors and suffixes.
> In essence, a ResourceProvider can not utilize any selectors or extensions to
> parametrize the resolution of its root resource.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)