Henrik Nordstrom writes:
 > Marc Lucke wrote:
 > > 
 > > I was wondering why Squid 2.2 stable 4 would go out & get over 300 mb
 > > & 100 mb the next day worth of data by itself at full speed without a
 > > request for it (byte hit ratios were showing negative).
 > 
 > I too have seen this, but I don't think I have seen it since configuring
 > quick_abort and range_offset_limit to be as restrictive as possible:
 > 
 > quick_abort_max 0 KB     (16 kb is the default)
 > range_offset_limit 0 KB  (this is the default)
A few days ago I saw our squid fetching more data than requested by
clients. It was squid 2.2.STABLE3 but the same problem appears with
2.2.STABLE5.
The problem is related to range requests: there are some web servers,
like the geocities' servers, which advertise themselves as supporting
range requests (Accept-Ranges: bytes) but in fact they don't. With
range_offset_limit set to 0 KB squid will fetch the whole file as
given by the server, but will send to the client only the requested
range.
I'm not sure what is the correct fix but I think that when
range_offset_limit is set to zero squid should send the whole file
when the server doesn't reply with a range response. I made a patch
which fixed the problem for us (see bellow).
Radu Greab
--- squid-2.2.STABLE5.orig/src/client_side.c	Sun Oct 24 06:21:47 1999
+++ squid-2.2.STABLE5/src/client_side.c	Sun Oct 24 07:29:47 1999
@@ -1043,6 +1043,8 @@
         range_err = "canonization failed";
     else if (httpHdrRangeIsComplex(http->request->range))
         range_err = "too complex range header";
+    else if (Config.rangeOffsetLimit <= 0)
+	range_err = "no range in reply and range_offset_limit <= 0";
     /* get rid of our range specs on error */
     if (range_err) {
         debug(33, 2) ("clientBuildRangeHeader: will not do ranges: %s.\n", range_err);
Received on Tue Nov 02 1999 - 08:00:07 MST
This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:31 MDT