[
https://issues.apache.org/jira/browse/SLING-7350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16309604#comment-16309604
]
Satya Deep Maheshwari edited comment on SLING-7350 at 1/3/18 12:54 PM:
-----------------------------------------------------------------------
Attaching a proposed change at [^SLING-7350.diff].
cc [[email protected]]
was (Author: satyadeep):
Attaching a proposed change.
cc [[email protected]]
> StreamRendererServlet redirects HEAD requests to external uri if available
> --------------------------------------------------------------------------
>
> Key: SLING-7350
> URL: https://issues.apache.org/jira/browse/SLING-7350
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Get 2.1.30
> Reporter: Satya Deep Maheshwari
> Attachments: SLING-7350.diff
>
>
> 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
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)