]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3280: allow max-size unset and min-size=N to be true for large objects
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 18 Jul 2011 22:43:59 +0000 (10:43 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 18 Jul 2011 22:43:59 +0000 (10:43 +1200)
src/store_dir.cc

index a7c90008fbe157bfe249e15991219e68f5eec170..6925700c02653cf289a3f68908034c9788b8808a 100644 (file)
@@ -169,7 +169,10 @@ SwapDir::objectSizeIsAcceptable(int64_t objsize) const
         return false;
 
     // Else, make sure that the object size will fit.
-    return min_objsize <= objsize && max_objsize > objsize;
+    if (max_objsize == -1 && min_objsize <= objsize)
+        return true;
+    else
+        return min_objsize <= objsize && max_objsize > objsize;
 }