You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <fm...@gmail.com> on 2009/02/19 22:13:54 UTC

[VOTE] Apply patch for SLING-864

Hi all,

In SLING-864 [1] Alexander Klimetscheck proposes a change in the
behaviour of the NonExistingResource class.

As per definition, the ResourceMetadata.getResolutionPathInfo() returns
the part of the request URI, which has been cut off to get the Resource
path. For example for a request URI of /content/test.x.html and a
Resource at /content/test, the resolution path info would be ".x.html".
The Sling Engine uses this value to create the RequestPathInfo object
available from the SlingHttpServletRequest.

Until now, the resolution path info property of a NonExistingResource
has not been set, because there is no way, that Sling may know where to
cut off the selectors, extension and suffix from the URI. And therefore
the path of the NonExistingResource was set to the request URI.

With the proposed change, the path of the NonExistingResource does not
change and is still the request URI. But the resolution path info
property is set to the string starting at the first dot in the URI path.
So for a request to /content/test.x.html the path would be
"/content/test.x.html" as before but the resolution path info property
would be set to ".x.html".

This allows for enhanced script resolution in the non-existing resource
case but remains backwards compatible with respect to the
SlingPostServlet, since the SlingPostServlet only considers the resource
path for non-existing resources and a-priori ignores the RequestPathInfo
object in this case.

I am aware of the fact, that this somehow violates the API spec for the
resource metadata. But since non-existing resources are special anyway,
I consider this change worth it and even think, that it is in the best
tradition of the flexibility of Sling.

Nevertheless, I consider this as kind of an incompatibilty and I would
like to start a quick lazy consensus vote, whether this patch should be
applied or not.

Please raise your hand(s) within the next 72h hours, if you see any
issues with this change. Otherwise I will apply the patch at the
beginning of next week.

Thanks and Regards
Felix


[1] https://issues.apache.org/jira/browse/SLING-864

Re: [VOTE] Apply patch for SLING-864

Posted by Carsten Ziegeler <cz...@apache.org>.
+1 for applying.

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org