Applying your 1-16-00 snapshot fixes the caching of documents without
a Content-Length header set. But the add_content_length patch does
not seem to be working correct. I did a make distclean, applied the
two patches, reconfigured, compiled, and installed. Afterwards a
packetsniff shows that no Content-Length header got added
HTTP/1.0 200 OK..Date: Sun, 16 Jan 2000 06:37:28 GMT..Server:
Apache/1.3.9 (Unix) mod_perl/1.21..Cache-Control: max-age=604800..Expires:
Sun, 23 Jan 2000 06:37:28 GMT..Content-Type: text/html..Age:
30..X-Cache: HIT from accelerator.powerisp.com..X-Cache-Lookup: HIT from
accelerator.domain.tld:80..Connection: close
On Sun, Jan 16, 2000 at 05:56:29AM +0100, Henrik Nordstrom wrote:
> William R Thomas wrote:
>
> > using server side includes were caching. The nearest I could tell is
> > that no pages which failed to set the Content-length header were
> > getting cached. All documents on the server I wish to accelerate set
> > Expires and Cache-control headers.
>
> Seems to work fine here.. but then my Squid-2.3 source trees are all
> slightly patched.. but I am not aware of having patched this, only a
> problem with persistent connections and IMS queries.
>
> > Additionally I noticed once I got 2.2STABLE5 working that Squid does
> > not add a Content-length header to documents which don't originally
> > have one.
>
> No, Squid does not do that. Not yet anyway. You could try the attached
> patch (applies to Squid-2.2 as well as Squid-2.3).
>
> --
> Henrik Nordstrom
> Squid hacker
> * squid-2.3.STABLE1.add_content_length.patch *
>
> Sun Jan 16 05:52:06 CET 2000
> Modified Files in squid/src
> client_side.c
>
> Add a Content-Length header on cache hits if none is present
>
>
> Index: squid/src/client_side.c
> diff -u squid/src/client_side.c:1.1.1.47.6.6 squid/src/client_side.c:1.1.1.47.6.7
> --- squid/src/client_side.c:1.1.1.47.6.6 Sun Jan 16 04:01:57 2000
> +++ squid/src/client_side.c Sun Jan 16 05:52:04 2000
> @@ -1173,6 +1173,10 @@
> httpHeaderDelById(hdr, HDR_CONNECTION);
> stringClean(&strConnection);
> }
> + /* Construct a Content-Length header if none is present */
> + if (is_hit && !httpHeaderHas(hdr, HDR_CONTENT_LENGTH)) {
> + httpHeaderPutInt(hdr, HDR_CONTENT_LENGTH, contentLen(http->entry));
> + }
> /* Handle Ranges */
> if (request->range)
> clientBuildRangeHeader(http, rep);
-- William R. Thomas PowerUser Technologies Email: wthomas@poweruser.com Phone: 847-215-3300 ext 1105 Fax: 847-215-3318 *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#* There is no such thing as a moral or an immoral book. Books are well written or badly written. -Oscar Wilde
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:50:25 MST