W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2012

Re: Content-Length and 304

From: Willy Tarreau <w@1wt.eu>
Date: Sat, 22 Sep 2012 18:19:38 +0200
To: Phillip Hallam-Baker <hallam@gmail.com>
Cc: "Roy T. Fielding" <fielding@gbiv.com>, Zhong Yu <zhong.j.yu@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <20120922161938.GL13235@1wt.eu>
On Sat, Sep 22, 2012 at 12:09:48PM -0400, Phillip Hallam-Baker wrote:
> I suggest that we grandfather the existing response codes and specify any
> exceptions (304 being one, are there others) and for the rest have the rule
> that if Content-Length (or a content-encoding) is specified then there MUST
> be a body and it indicates the length of the body. If there is no body the
> content length MUST be omitted.

There are other conditions. Content-length is ignored for response messages
which do not include a body, which means intermediary codes 1xx, code 204,
code 304, and final responses to HEAD requests.

I don't think we should try to change the rules. We've had issues for years
with determining the body length but such issues have been fixed along the
time, so it would be better not to try to reformulate too much the rules,
which would risk to cause some confusion.

What Roy has proposed seems OK to me, it definitely closes the issue with
the 304 code, we should not try to go further in my opinion.

Regards,
Willy
Received on Saturday, 22 September 2012 16:20:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 September 2012 16:20:11 GMT