From cfd488361b7e2eb1783afcf7dd16f00127897c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B4me=20Bakker?= Date: Wed, 11 Oct 2023 12:04:37 +0200 Subject: [PATCH] fix(cache): report HTTP 410 Gone on stale cache urls Instead of 200 Ok fixes #14086 --- engine/classes/Elgg/Application/CacheHandler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/classes/Elgg/Application/CacheHandler.php b/engine/classes/Elgg/Application/CacheHandler.php index e2c412cbb93..359247e4273 100644 --- a/engine/classes/Elgg/Application/CacheHandler.php +++ b/engine/classes/Elgg/Application/CacheHandler.php @@ -189,6 +189,9 @@ public function handleRequest(Request $request, Application $app) { $this->simplecache->cacheAsset($viewtype, $view, $content); } else { // if wrong timestamp, don't send HTTP cache + // also report that the resource has gone away + $response->setStatusCode(ELGG_HTTP_GONE); + $content = $this->getProcessedView($view, $viewtype); }