Skip to content

Commit 617f7a1

Browse files
committed
TASK: Return correct response for Flow 5.x
1 parent faea27e commit 617f7a1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Classes/Http/RequestInterceptorComponent.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ public function handle(ComponentContext $componentContext)
6565

6666
$entry = $this->cacheFrontend->get($entryIdentifier);
6767
if ($entry) {
68-
$response = parse_response($entry);
68+
if (class_exists('Neos\\Flow\\Http\\Response')) {
69+
$response = \Neos\Flow\Http\Response::createFromRaw($entry);
70+
} else {
71+
$response = parse_response($entry);
72+
}
6973
$response = $response->withHeader('X-From-FullPageCache', $entryIdentifier);
7074
$componentContext->replaceHttpResponse($response);
7175
$componentContext->setParameter(ComponentChain::class, 'cancel', true);

0 commit comments

Comments
 (0)