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

Re: Content-Length and 304

From: Tim Bray <tbray@textuality.com>
Date: Thu, 20 Sep 2012 10:38:16 -0700
Message-ID: <CAHBU6it4nKjFh86iXUEh4PnPEeDjJi6g=9bQLxmiwy75hWBUng@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: Julian Reschke <julian.reschke@gmx.de>, Zhong Yu <zhong.j.yu@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
It seems like a CL of 0 (or anything other than the actual representation’s
length) is just wrong.  I suggest language to the effect of “The
Content-length value, if provided, MUST be accurate”.  I.e. if the server
chooses not to provide the correct answer, it should not send the header.
Or is there a case for a reserved value of -1 meaning “Not provided”?

I have to say that I don’t understand the motivation for encouraging
Content-length with 304 at all; that’s another argument, but I think we can
agree that it should either be accurate or absent.

FWIW, when I was making my living writing large-scale Web spiders, I
quickly learned to just treat Content-length as science fiction, suck it up
and deal with whatever data the server actually sent. But that was a decade
ago; maybe things are better now.

-Tim

On Thu, Sep 20, 2012 at 10:27 AM, Mark Nottingham <mnot@mnot.net> wrote:

> My experience has always been that the C-L on a 304 represents the length
> of the response had it been whole, and I see that as just a clarification
> of current practice.
>
> However, I agree that the SHOULD is too strong here, as it makes several
> existing implementations non-conformant.
>
> Cheers,
>
>
> On 20/09/2012, at 2:46 AM, Julian Reschke <julian.reschke@gmx.de> wrote:
>
> > On 2012-09-20 03:22, Zhong Yu wrote:
> >> In the latest bis draft, a 304 response SHOULD set Content-Length
> >> equal to the length of the would-be payload body.
> >> ...
> >
> > That was the case since -19 (just clarifying).
> >
> > I also note that the requirements in P1 (Content-Length) and P4 (status
> code 304) do not seem to be totally in sync.
> >
> > Best regards, Julian
> >
>
> --
> Mark Nottingham
> http://www.mnot.net/
>
>
>
>
>
>
Received on Thursday, 20 September 2012 17:38:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 September 2012 17:38:51 GMT