From: Alex Rousskov Date: Wed, 25 Jun 2014 00:07:41 +0000 (-0600) Subject: Do not use unknown entry size in StoreEntry::checkTooSmall() determination. X-Git-Tag: SQUID_3_5_0_1~169 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41afe8b27555949b1ef75c21fb2a388a8730fd15;p=thirdparty%2Fsquid.git Do not use unknown entry size in StoreEntry::checkTooSmall() determination. The size of collapsed entries is often unknown, even when they are STORE_OK (because swap_hdr_sz is unknown when the other worker has created the cache entry). The same code has been using this ignore-unknowns logic for the Content-Length header value, so the rejection of unknown entry size (added as a part of C++ conversion without a dedicated message in r5766) could have been a typo. --- diff --git a/src/store.cc b/src/store.cc index ff7504aa6c..7819573f57 100644 --- a/src/store.cc +++ b/src/store.cc @@ -941,7 +941,7 @@ StoreEntry::checkTooSmall() return 0; if (STORE_OK == store_status) - if (mem_obj->object_sz < 0 || + if (mem_obj->object_sz >= 0 && mem_obj->object_sz < Config.Store.minObjectSize) return 1; if (getReply()->content_length > -1)