From: robertc <> Date: Sat, 24 May 2003 18:43:30 +0000 (+0000) Subject: Summary: Fix bug #646 X-Git-Tag: SQUID_3_0_PRE1~160 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f1b135075d755c2b283fb51317648d5e21da952;p=thirdparty%2Fsquid.git Summary: Fix bug #646 Keywords: Tail requests when there is any range offset limit should not result in full object retrieval. --- diff --git a/src/HttpHdrRange.cc b/src/HttpHdrRange.cc index 560b8c8c2f..c7399f09e8 100644 --- a/src/HttpHdrRange.cc +++ b/src/HttpHdrRange.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrRange.cc,v 1.32 2003/03/06 06:21:36 robertc Exp $ + * $Id: HttpHdrRange.cc,v 1.33 2003/05/24 12:43:30 robertc Exp $ * * DEBUG: section 64 HTTP Range Header * AUTHOR: Alex Rousskov @@ -574,6 +574,8 @@ HttpHdrRange::lowestOffset(ssize_t size) const /* * Return true if the first range offset is larger than the configured * limit. + * Note that exceeding the limit (returning true) results in only + * grabbing the needed range elements from the origin. */ bool HttpHdrRange::offsetLimitExceeded() const @@ -586,6 +588,10 @@ HttpHdrRange::offsetLimitExceeded() const /* disabled */ return false; + if (firstOffset() == -1) + /* tail request */ + return false; + if ((ssize_t)Config.rangeOffsetLimit >= firstOffset()) /* below the limit */ return false;