On 13/12/2018 07:44, Violeta Georgieva wrote:
> Hi,
> 
> На чт, 13.12.2018 г. в 2:58 ч. Christopher Schultz <
> ch...@christopherschultz.net> написа:
>>
> Mark,
> 
> On 12/12/18 18:26, Mark Thomas wrote:
>>>> On 12/12/2018 23:25, ma...@apache.org wrote:
>>>>> Author: markt Date: Wed Dec 12 23:25:39 2018 New Revision:
>>>>> 1848810
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1848810&view=rev Log:
>>>>> Ensure that the HEAD response is consistent with the GET response
>>>>> when HttpServlet is relied upon to generate the HEAD response and
>>>>> the GET response uses chunking.
>>>>
>>>> Views on back-porting this?
> 
> Hmm.
> 
> If HEAD is supposed to be GET-without-body... what does the spec
> actually say about chunked encoding? Technically, there is no such
> thing as a "chunked" HEAD response, so... do we even owe the client a
> Content-Length with a HEAD request?
> 
>> I think we can remove the chunked encoding
> 
>> "The server SHOULD send the same
>>    header fields in response to a HEAD request as it would have sent if
>>    the request had been a GET, except that the payload header fields
>>    (Section 3.3) MAY be omitted."
> 
>> https://tools.ietf.org/html/rfc7231#section-4.3.2

Thanks. That is very helpful.

The behaviour prior to the patch is clearly wrong. The content-length
header in the HEAD response (in this instance) is incorrect as it is not
present for the equivalent GET.

We can choose whether or not to return the payload headers. My
preference is to return them if we can as I think they may be useful to
some clients but if the consensus is to remove them I'd be fine with that.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to