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

Re: p2: Content-Length in HEAD responses

From: Willy Tarreau <w@1wt.eu>
Date: Sat, 20 Apr 2013 11:06:47 +0200
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Message-ID: <20130420090647.GQ26517@1wt.eu>
On Sat, Apr 20, 2013 at 06:41:01PM +1000, Mark Nottingham wrote:
> p2 4.3.2 says:
>     Aside from the payload header fields (Section 3.3), 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.
> The payload header fields include Content-Length, which in my testing is
> pretty common in HEAD responses. Was this an oversight, or intentional?

In my opinion it was intentional, as it's the only way for a client
to know the payload size in advance without retrieving the file.

Also I remember about at least one cache which used to truncate cached
contents when a server returned "content-length: 0" in response to a
HEAD request. So most likely, especially due to caches, we don't want
the server to return a different content-length on HEAD as much as

> (We already have an exception for HEAD responses in p1's message body length
> algorithm, section 3.3.3).

Exactly, so the SHOULD above should not cause any issue.

Received on Saturday, 20 April 2013 09:07:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:10 UTC