]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Fix bug #646
authorrobertc <>
Sat, 24 May 2003 18:43:30 +0000 (18:43 +0000)
committerrobertc <>
Sat, 24 May 2003 18:43:30 +0000 (18:43 +0000)
Keywords:

Tail requests when there is any range offset limit should not result in full object retrieval.

src/HttpHdrRange.cc

index 560b8c8c2fe76a590144c558c0caae5b622533a8..c7399f09e84ee216427e5ff2352278ce454ab974 100644 (file)
@@ -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;