Dirk Tschentscher created SLING-13144:
-----------------------------------------
Summary: 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
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)