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

StreamRendererServlet redirects HEAD requests to external uri if available

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Servlets Get 2.1.30
    • None
    • Servlets
    • None

    Description

      SLING-7140 added a feature to support redirects to external uri of a resource if available. This handled by StreamRendererServlet. See [1]. As per the current implementation, if there's a uri available, a redirect is done for a http HEAD request as well. This can be problematic for clients which expect the response as sent by the servlet as of now if the response is different from the redirected HEAD request.

      Would it be correct to handle the HEAD request before the redirect so that its current behavior is retained?

      [1] - https://github.com/apache/sling-org-apache-sling-servlets-get/blob/8ba11a174996ca4b7237c54879d1db8f14796f4d/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java#L171-L173

      Attachments

        1. SLING-7350.diff
          1 kB
          Satya Deep Maheshwari

        Issue Links

          Activity

            People

              Unassigned Unassigned
              satyadeep Satya Deep Maheshwari
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: