Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-791

Redirect location invalid when request has trailing /

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Servlets Get 2.0.2
    • Servlets Get 2.0.4
    • Servlets
    • 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.

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: