[ 
https://issues.apache.org/jira/browse/SLING-7350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16366785#comment-16366785
 ] 

Satya Deep Maheshwari commented on SLING-7350:
----------------------------------------------

[~ianeboston], I agree that treating HEAD and GET any differently would be  
incorrect behavior. [https://tools.ietf.org/html/rfc7231#section-4.3.2] and 
[https://tools.ietf.org/html/rfc2616#section-10.3.3] both mention it on similar 
lines.

 

I came across this problem while using a client coded within a proprietary 
software.

> 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
>            Priority: Major
>         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
(v7.6.3#76005)

Reply via email to