]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cache_manager.cc
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)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 27 Jun 2023 13:09:31 +0000 (13:09 +0000)
commit92a5adb73b7a50d725fd122c6d27cf8ce1c109f3
treeae5d8d7bd0bed39320bdef8d3b76642d2ff3d27c
parent122a6e3cb1a26940369b5af5323a6b6e7a4a5928
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