Re: 304 response with Content-Length header == OK?
Wham Bang (wham_bang@yahoo.com)
Mon, 28 Jun 1999 14:41:55 -0700 (PDT)
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