You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (Jira)" <ji...@apache.org> on 2026/04/13 13:45:00 UTC
[jira] [Resolved] (SLING-13144) PostServlet with space in :redirect
[ https://issues.apache.org/jira/browse/SLING-13144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert resolved SLING-13144.
------------------------------------
Fix Version/s: Servlets Post 3.0.4
Assignee: Stefan Seifert
Resolution: Fixed
thanks for the PR!
fixed with https://github.com/apache/sling-org-apache-sling-servlets-post/commit/8f0aaff0fb3654bbad1040d644f66c24b6d864cd
> PostServlet with space in :redirect
> -----------------------------------
>
> Key: SLING-13144
> URL: https://issues.apache.org/jira/browse/SLING-13144
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Reporter: Dirk Tschentscher
> Assignee: Stefan Seifert
> Priority: Minor
> Fix For: Servlets Post 3.0.4
>
>
> I update data via PostSevlet and replace the markup fragment with the changes.
> Therefore I send ':redirect=/content/new.html' with the post.
>
> However, I have content paths with spaces, legacy reasons...
>
> Either I have a ' ' in there ->
> {{URISyntaxException: Illegal character in path at index ... SlingPostServlet.getRedirectUrl(SlingPostServlet.java:449) [org.apache.sling.servlets.post:3.0.0]}}
>
> Or I encode it as %20, but then I'm getting %20 encoded again as %2520 in location header:
>
> {code:java}
> curl -i -Ftitle="my redirect" -F:redirect="/content/new/my%20space.json" http://admin:admin@localhost:8080/new/content/my%20space
> {code}
> Location: http://localhost:8080/new/my%2520space.json
>
> {{--> "Error 400 Ambiguous URI path encoding"}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)