You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (Commented) (JIRA)" <ji...@apache.org> on 2012/02/24 19:41:49 UTC

[jira] [Commented] (SLING-2426) SlingSafeMethodsServlet's default HEAD implementation not completely RFC compliant

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

Felix Meschberger commented on SLING-2426:
------------------------------------------

Hmm, the problematic sentence is "might switch to chunked transfer". Not having checked any spec or such, but how would we be able to know whether the servlet container might switch or not ?

Off the top of my head, I would assume that chunked is switched on if there is no Content-Length header but the response gets committed.

But how do we do chunked transfer without a body stating "that's it" ?
                
> SlingSafeMethodsServlet's default HEAD implementation not completely RFC compliant
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2426
>                 URL: https://issues.apache.org/jira/browse/SLING-2426
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: API 2.2.0
>            Reporter: Boris Pruessmann
>
> RFC 2616 states: "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response." 
> The current implementation of the SlingSafeMethodsServlet does not guarantee what's stated above - if the GET call's response gets too big, the servlet engine might switch to chunked transfer. However, the HEAD call returns a valid Content-Length header no matter what, resulting in HEAD returning different headers than the corresponding GET call.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira