W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > May to August 1999

Re: 304 response with Content-Length header == OK?

From: Wham Bang <wham_bang@yahoo.com>
Date: Mon, 28 Jun 1999 14:41:55 -0700 (PDT)
Message-ID: <19990628214155.20505.rocketmail@web105.yahoomail.com>
To: mcmanus@appliedtheory.com
Cc: http-wg@cuckoo.hpl.hp.com

Hello again,

Hmmmm, in retrospect I'm a little disapointed at myself for
troubling the list with stuff that turns out to be
pretty clearly spelled out in the spec...  Sorry.

--- Patrick McManus <mcmanus@appliedtheory.com> wrote:
> In a previous episode Wham Bang said...
> :: [...]
> :: response on a conditional GET:
> :: 
> :: > HTTP/1.0 304 Not Modified
> :: > Content-type: image/gif
> :: > Content-length: 4672
> :: > Expires: Thu, 15 Apr 2010 20:00:00 GMT
> :: > Last-modified: Fri, 15 Apr 1994 00:00:00 GMT
> :: >
> :: 
> :: The response didn't contain a body, but the presence
> :: of a Content-Length threw off the proxy. [...]
>
> [...]
> as for your proxy:
> [...]
> 
>    1.Any response message which "MUST NOT" include a message-body
>      (such as the 1xx, 204, and 304 responses and any response to a
>      HEAD request) is always terminated by the first empty line after
>      the header fields, regardless of the entity-header fields
>      present in the message.
> 
> so ignoring content-length isn't just tolerant, it's required.
> 

Yes, the quote makes it quite clear. Hey, at least I was going to
fix it. :)

> and as for the content provider:
> 
> 14.13 Content-Length
> 
>    The Content-Length entity-header field indicates the size of the
>    entity-body, in decimal number of OCTETs, sent to the recipient
>    or, in the case of the HEAD method, the size of the entity-body
>    that would have been sent have been sent had the request been a
>    GET.
> 
> they're definitely in the wrong as their entity body is size 0 and
> they aren't responding to a HEAD.
> 

Someone disagreed with this opinion via email, but I'd tend
to agree. The language is (again) quite clear. Putting in
Content-Length: 0 would've been OK though.

Thanks for the clarifications!

===
Wham! <wham_bang@yahoo.com>



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Received on Monday, 28 June 1999 22:43:04 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:33:31 EDT