t3n / neos-debug

Adds a debug panel to your Neos CMS website
MIT License
30 stars 16 forks source link

t3n.Neos.Debug breaks Neos.Fusion:Http.ResponseHead #105

Closed grebaldi closed 3 years ago

grebaldi commented 4 years ago

When t3n.Neos.Debug is enabled, any HTTP header set via Neos.Fusion:Http.ResponseHead won't get rendered.

I couldn't quite pinpoint what mechanism causes this, but I could verify that disabling t3n.Neos.Debug solves the issue.

To be more exact:

With t3n.Neos.Debug disabled, the Neos\Neos\Controller\Frontend\NodeController->showAction() receives a PSR-7-Response object from its fusion view containing all headers from Neos.Fusion:Http.ResponseHead.

With t3n.Neos.Debug enabled, Neos\Neos\Controller\Frontend\NodeController->showAction() receives a string instead, with all headers stripped.

albe commented 3 years ago

I suspect the following line: https://github.com/t3n/neos-debug/blob/master/Classes/Aspect/CollectDebugInformationAspect.php#L117-L118

It effectively throws the response metadata like headers away and only renders the body into the output.