W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2010

Transfer-Encoding in a HEAD response

From: Wenbo Zhu <wenboz@google.com>
Date: Sun, 11 Apr 2010 15:05:42 -0700
Message-ID: <z2v83c4e7ff1004111505yda1c2c1r61f640b427dca85a@mail.gmail.com>
To: ietf-http-wg@w3.org
I have recently noticed that many public websites, in responding to a
HEAD request, will:

- omit Transfer-Encoding from the response headers if the GET response
will be chunk-encoded;
-- or (as expected) set the Content-Length if the GET response isn't
going to be chunk-encoded;
- or set Content-Length = 0;
- or set a manual Content-Length as if there would be no
chunk-encoding for the GET response.

While rfc-2616 doesn't require all the headers appear in the HEAD
response, the confusion here mostly lies in whether Transfer-Encoding
is applicable for a HEAD response (as it is the case for
Content-Length).

To clarify, 7.4 (9.4/rfc2616) may state: "The metainformation
contained in the HTTP headers in response to a HEAD request SHOULD be
identical to the information sent in response to a GET request; and
any headers that describe message body should be applied to the
response of the GET request".

- Wenbo
Received on Sunday, 11 April 2010 22:06:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:18 GMT