]> git.ipfire.org Git - thirdparty/squid.git/commit
Do not cache (and do not serve cached) cache manager responses (#1185)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 27 Jun 2023 11:58:16 +0000 (11:58 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Fri, 30 Jun 2023 12:55:30 +0000 (00:55 +1200)
commit0298bbbefcc9eea82eb5ea29f8b612539b8caf46
treec923726ee9303328abc9c2cc54a83676758aeadc
parent61444c8175528589baa341402c365253cebd09fd
Do not cache (and do not serve cached) cache manager responses (#1185)

The fixed bug affected cache manager transactions that were using
/squid-internal-mgr URL path prefix with http(s) URL scheme. It did not
affect transactions that were using legacy cache_object URL scheme.

Stale cache manager responses had their Age response header set to the
number of seconds since Unix epoch. If disk and memory caches were
disabled, then cache manager requests just triggered "found KEY_PRIVATE"
WARNINGs in cache.log (for reasons that remain unclear).

Probably broken since 2011 commit e37bd29 that did not expand
HttpRequest::maybeCacheable() (called cacheable() back then)
PROTO_CACHE_OBJECT check to include /squid-internal-mgr requests.

Also added missing Access-Control-* response headers to cache manager
responses in SMP mode and reduced code duplication related to sending
those headers (which led to them missing in SMP Squids).
src/CacheManager.h
src/RequestFlags.h
src/cache_manager.cc
src/client_side.cc
src/client_side_reply.cc
src/internal.cc
src/internal.h
src/mgr/Action.cc
src/mgr/Inquirer.cc
src/tests/stub_cache_manager.cc