You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Eric Norman (Jira)" <ji...@apache.org> on 2022/06/11 22:51:00 UTC

[jira] [Resolved] (SLING-11347) SlingUriBuilder.createFrom(request) should preserve any mapped resource path

     [ https://issues.apache.org/jira/browse/SLING-11347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Norman resolved SLING-11347.
---------------------------------
    Resolution: Fixed

Merged PR #14 at:  [{{2c82030}}|https://github.com/apache/sling-org-apache-sling-api/commit/2c820300ee67eaa43e925a646dd4398dcda7a2be]

> SlingUriBuilder.createFrom(request) should preserve any mapped resource path
> ----------------------------------------------------------------------------
>
>                 Key: SLING-11347
>                 URL: https://issues.apache.org/jira/browse/SLING-11347
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Eric Norman
>            Assignee: Eric Norman
>            Priority: Minor
>             Fix For: API 2.25.2
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Use Case:
> Use the SlingUriBuilder.createFrom(request) call from a servlet in order to create a SlingUri from the current request in order to change the selectors (or extension) and then redirect to that new uri value.
> Expected:
> When calling SlingUriBuilder.createFrom(request) for a mapped request path, the built SlingUri object should return the original mapped path from the getResourcePath() call instead of the resource path that was resolved from the mapped path.
> This should help to avoid accidentally switching from /folder/page1 to /content/folder/page1 in the SlingUri output.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)