From e27c39d1cae0d42152945989ecd7413249ad0b8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 19 May 2022 14:50:40 +0200 Subject: [PATCH] Handle LegacyPlaceholderResponse in RequestHandler --- .../files/lib/system/request/RequestHandler.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 44a316117e..3e691fcce4 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -5,6 +5,7 @@ namespace wcf\system\request; use GuzzleHttp\Psr7\Header; use Laminas\HttpHandlerRunner\Emitter\SapiEmitter; use Psr\Http\Message\ResponseInterface; +use wcf\http\LegacyPlaceholderResponse; use wcf\system\application\ApplicationHandler; use wcf\system\box\BoxHandler; use wcf\system\exception\AJAXException; @@ -117,6 +118,10 @@ class RequestHandler extends SingletonFactory */ private function sendPsr7Response(ResponseInterface $response) { + if ($response instanceof LegacyPlaceholderResponse) { + return; + } + // Storing responses in a shared cache is unsafe, because they all contain session specific information. // Add the 'private' value to the cache-control header and remove any 'public' value. $cacheControl = [ -- 2.20.1