Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Servlets Get 2.0.2
-
None
Description
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.