From: Tim Düsterhus Date: Thu, 19 May 2022 12:50:40 +0000 (+0200) Subject: Handle LegacyPlaceholderResponse in RequestHandler X-Git-Tag: 6.0.0_Alpha_1~1266^2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e27c39d1cae0d42152945989ecd7413249ad0b8a;p=GitHub%2FWoltLab%2FWCF.git Handle LegacyPlaceholderResponse in RequestHandler --- 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 = [