- PURGE now also purges the DNS cache
- HEAD on FTP objects no longer retreives the whole object
- More cleanups of the dstdomain ACL type
+ - Squid no longer tries to do Range internally if it is not supported
+ by the origin server. Doing so could cause bandwidth spikes and/or
+ negative hit ratio.
Changes to Squid-2.4.DEVEL2 ():
/*
- * $Id: client_side.cc,v 1.477 2000/05/02 20:18:21 hno Exp $
+ * $Id: client_side.cc,v 1.478 2000/05/02 20:24:44 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
{
HttpHeader *hdr = rep ? &rep->header : 0;
const char *range_err = NULL;
- assert(http->request->range);
+ request_t *request = http->request;
+ int is_hit = isTcpHit(http->log_type);
+ assert(request->range);
/* check if we still want to do ranges */
if (!rep)
range_err = "no [parse-able] reply";
range_err = "canonization failed";
else if (httpHdrRangeIsComplex(http->request->range))
range_err = "too complex range header";
+ else if (!request->flags.cachable) /* from we_do_ranges in http.c */
+ range_err = "non-cachable request";
+ else if (!is_hit && Config.rangeOffsetLimit < httpHdrRangeFirstOffset(request->range)
+ && Config.rangeOffsetLimit != -1) /* from we_do_ranges in http.c */
+ range_err = "range outside range_offset_limit";
/* get rid of our range specs on error */
if (range_err) {
debug(33, 3) ("clientBuildRangeHeader: will not do ranges: %s.\n", range_err);