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 (JIRA)" <ji...@apache.org> on 2012/08/14 09:56:38 UTC

[jira] [Created] (SLING-2560) Support regular expressions for ResourceResolver.map configuration

Felix Meschberger created SLING-2560:
----------------------------------------

             Summary: Support regular expressions for ResourceResolver.map configuration
                 Key: SLING-2560
                 URL: https://issues.apache.org/jira/browse/SLING-2560
             Project: Sling
          Issue Type: New Feature
          Components: JCR
    Affects Versions: JCR Resource 2.1.0
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger


Currently configuration in /etc/map supports using regular expressions to resolve URLs to resource paths. Such regular expression can also include replacement patterns such as

    http/host.90/(.*)   =>  /content/host/$1

Such replacement patterns are not easily revertible and thus such entries only influence URL resolution through ResourceResolver.resolve but not resource path mapping through ResourceResolver.map.

As a new feature, support should be created to be able to have regular expressions with replacements patterns for path mapping such as:

    /content/([^/]+)/routed/(.*)  => http://$1/$2

This requires the ability to register internal paths in addition to URL paths in the /etc/map structure which map to URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2560) Support regular expressions for ResourceResolver.map configuration

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454414#comment-13454414 ] 

Felix Meschberger commented on SLING-2560:
------------------------------------------

The simples approach is to allow the sling:match property to actually be a replacement pattern (e.g. http://$1/$2 ) and the sling:internalRedirect property to be a regular expression (e.g. /content/([^/]+)/routed/(.*))
                
> Support regular expressions for ResourceResolver.map configuration
> ------------------------------------------------------------------
>
>                 Key: SLING-2560
>                 URL: https://issues.apache.org/jira/browse/SLING-2560
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>
> Currently configuration in /etc/map supports using regular expressions to resolve URLs to resource paths. Such regular expression can also include replacement patterns such as
>     http/host.90/(.*)   =>  /content/host/$1
> Such replacement patterns are not easily revertible and thus such entries only influence URL resolution through ResourceResolver.resolve but not resource path mapping through ResourceResolver.map.
> As a new feature, support should be created to be able to have regular expressions with replacements patterns for path mapping such as:
>     /content/([^/]+)/routed/(.*)  => http://$1/$2
> This requires the ability to register internal paths in addition to URL paths in the /etc/map structure which map to URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SLING-2560) Support regular expressions for ResourceResolver.map configuration

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454857#comment-13454857 ] 

Felix Meschberger commented on SLING-2560:
------------------------------------------

Implemented this change in Rev. 1384308: If a sling:internalRedirect value is a regular expression it is only used for the mapping map (converting internal paths/URLs to external URLs) not for the resolution map (converting incoming request URLs to resources or redirects).
                
> Support regular expressions for ResourceResolver.map configuration
> ------------------------------------------------------------------
>
>                 Key: SLING-2560
>                 URL: https://issues.apache.org/jira/browse/SLING-2560
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>
> Currently configuration in /etc/map supports using regular expressions to resolve URLs to resource paths. Such regular expression can also include replacement patterns such as
>     http/host.90/(.*)   =>  /content/host/$1
> Such replacement patterns are not easily revertible and thus such entries only influence URL resolution through ResourceResolver.resolve but not resource path mapping through ResourceResolver.map.
> As a new feature, support should be created to be able to have regular expressions with replacements patterns for path mapping such as:
>     /content/([^/]+)/routed/(.*)  => http://$1/$2
> This requires the ability to register internal paths in addition to URL paths in the /etc/map structure which map to URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (SLING-2560) Support regular expressions for ResourceResolver.map configuration

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-2560.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: Resource Resolver 1.0.0

This is done.
                
> Support regular expressions for ResourceResolver.map configuration
> ------------------------------------------------------------------
>
>                 Key: SLING-2560
>                 URL: https://issues.apache.org/jira/browse/SLING-2560
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Resource Resolver 1.0.0
>
>
> Currently configuration in /etc/map supports using regular expressions to resolve URLs to resource paths. Such regular expression can also include replacement patterns such as
>     http/host.90/(.*)   =>  /content/host/$1
> Such replacement patterns are not easily revertible and thus such entries only influence URL resolution through ResourceResolver.resolve but not resource path mapping through ResourceResolver.map.
> As a new feature, support should be created to be able to have regular expressions with replacements patterns for path mapping such as:
>     /content/([^/]+)/routed/(.*)  => http://$1/$2
> This requires the ability to register internal paths in addition to URL paths in the /etc/map structure which map to URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira