Re: rep_mime_type bugfix

From: Robert Collins <robert.collins@dont-contact.us>
Date: Wed, 14 Feb 2001 19:02:38 +1100

----- Original Message -----
From: "Henrik Nordstrom" <hno@hem.passagen.se>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Wednesday, February 14, 2001 6:51 PM
Subject: Re: rep_mime_type bugfix

> Robert Collins wrote:
> >
> > Because :]
> >
> > With unknown length entities (which includes entities that have server side content process (such as transfer encoding) as well
as
> > dynamically generated entities) we will not be able to test the second part of that logic. So we end up a) testing for no
> > content-length only, and that is a bad thing in my book; or b) repeating the test after we start recieving body data in
client_side
> > || buffering past the headers in client side just to test this.
>
> Not quite. RFC2616 defines very strict rules when there is a entity or
> not.

Yes. And they are:
Responses 1xx, 204 & 304 never have entity bodies. (tested for now).
Other responses have entity bodies, but they may be of zero length. (harder to test reliably)

Case in point:
A dynamic cgi script typically doesn't set the content-length (unknown when it starts). So we have no content-length header.

Consider the following state in squid:
we've processed the headers, there's no more data waiting to be processed until another network read occurs, and there is no
content-length header, and no body content as yet...

at this point we simply do not know whether to expect a non-zero entity length.

Rob
Received on Wed Feb 14 2001 - 01:01:05 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:30 MST