[
https://issues.apache.org/jira/browse/SLING-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040818#comment-16040818
]
Roy T. Fielding commented on SLING-848:
---------------------------------------
To hopefully clarify, a path segment is each part between slash characters. I
don't know if Sling has any use for parameters on hierarchical segments (e.g.,
versioned folders), but it would be odd for Sling to disallow them on parts of
the URI it might not control.
IOW, rule 1 might be OK but is overly restrictive for segments we don't own; 2
is just plain weird (if that is desired, use selectors instead of parameters);
and both 3 and 4 are horribly ugly and unlikely to interop because many
reference parsers will stop on single-quotes.
Instead of single-quotes, it is better to append parameters and encode specific
characters that we think might confuse data with delimiters. In general, URIs
are meant to be LR parsed without any look-ahead for matching
brackets/parens/quotes.
> Support getting versioned resources by using uri path parameters
> ----------------------------------------------------------------
>
> Key: SLING-848
> URL: https://issues.apache.org/jira/browse/SLING-848
> Project: Sling
> Issue Type: New Feature
> Components: API, JCR, ResourceResolver
> Affects Versions: JCR Resource 2.0.2
> Reporter: Carsten Ziegeler
> Assignee: Tomek Rękawek
> Fix For: JCR Resource 2.5.0, API 2.9.0, Resource Resolver 1.2.0
>
> Attachments: SLING-848-metadata.patch
>
>
> Getting versioned content should be support thorough uri path parameters,
> like /something/hello;v=1.1
> For jcr based resources the value of the version should either point to a
> version name or label.
> In order to not change our existing apis, we introduce a new utility method
> which removes all uri path parameters
> and returns a map of these. Every resource provider could use this utility
> method and then decide to act on these
> parameters.
> If a requested version does not exists, a 404 is returned.
> If the requested node does not directly point to a versionable node, the
> algorithm checks the parent hierarchy until a versionable node is found, and
> tries to get the version of this node and then goes down the path again. If
> the versionable node does not have the requested version or the child, a 404
> is returned.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)