]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 2833 pt2: Collapse internal revalidation requests (SMP-unaware caches), again.
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Wed, 14 Jun 2017 20:23:01 +0000 (08:23 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 14 Jun 2017 20:23:01 +0000 (08:23 +1200)
commit841be5071dbed71b8df00a50a5c6ee882824468e
treefd6e6bcc846bff98d76717ef959be9f06b13beb1
parent98fb4e0462a16c0ac478ae793b3ddfdbcfcc682f
Bug 2833 pt2: Collapse internal revalidation requests (SMP-unaware caches), again.

The security fix in v5 r14979 had a negative effect on collapsed
forwarding. All "private" entries were considered automatically
non-shareable among collapsed clients. However this is not true: there
are many situations when collapsed forwarding should work despite of
"private" entry status: 304/5xx responses are good examples of that.
This patch fixes that by means of a new StoreEntry::shareableWhenPrivate
flag.

The suggested fix is not complete: To cover all possible situations, we
need to decide whether StoreEntry::shareableWhenPrivate is true or not
for all contexts where StoreEntry::setPrivateKey() is used. This patch
fixes only few important cases inside http.cc, making CF (as well
collapsed revalidation) work for some [non-cacheable] response status
codes, including 3xx, 5xx and some others.

The original support for internal revalidation requests collapsing
was in trink r14755 and referred to Squid bugs 2833, 4311, and 4471.
src/MemStore.cc
src/Store.h
src/client_side_reply.cc
src/fs/rock/RockSwapDir.cc
src/fs/ufs/UFSSwapDir.cc
src/http.cc
src/http.h
src/store.cc
src/tests/stub_store.cc
src/tests/testStoreController.cc
src/tests/testStoreHashIndex.cc