Redirect location invalid when request has trailing /
-----------------------------------------------------
Key: SLING-791
URL: https://issues.apache.org/jira/browse/SLING-791
Project: Sling
Issue Type: Bug
Components: Servlets Get
Affects Versions: Servlets Get 2.0.2
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: Servlets Get 2.0.4
When a request whose request URL has a trailing slash is resolved to a
sling:redirect resource, the redirect Location: header is computed incorrectly.
Example: Consider a setup, where a request without an extension is redirected
to the same URL but with a ".html" extension. Any trailing slash in the initial
request is ignored.
Thus the request http://host/some/part/ should be redirected to
http://host/some/part.html. Problem is, that logic to create relative Location:
headers is incorrectly handling the trailing slash, thus instead of redirecting
to a relative path of ../part.html, the redirect goes to part.html thus
resulting in the URL http://host/some/part/part.html to be sent by the client
browser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.