]> git.ipfire.org Git - thirdparty/squid.git/commit - src/http.h
Collapse internal revalidation requests (SMP-unaware caches), again.
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 1 Jun 2017 23:34:40 +0000 (17:34 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 1 Jun 2017 23:34:40 +0000 (17:34 -0600)
commit39fe14b23a8168e233600625a45034a7b33c912a
tree5f29e9465a51a8a1ece78c9a44c0404138de7417
parentef396425a6c53a4194fe3a66becf9191cf0b4ff1
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