New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement PSR-7 for Neos 5.0 compatibility #19
Conversation
Well technically I woudl say what this does isn't even "allowed" in userland code. I have no spontanous idea how to fix it without using too much internal knowledge. Correct woudl be to run the full HTTP component chain with a fake http request and then grab the response at the end, but I am really not sure how well that will work in a viewhelper inside another active request.... |
It's probably not the best solution, but at least it does work with Neos 5.0. #18 is included here, because it won't work without. |
You changed the internal behaviour to use a Curl-Request to fetch the 404 page right? This has implications with several scenarios (on pages with HTTP Basic Auth or with self signed certificates). Is there no way to use an internal request like before? |
I found a way to use an internal request by using the |
yep correct that's what I meant, BUT I am not sure if that messes with security... |
Technically we are not 100% setup to run a second http chain separately while one is running already, due to singletons |
The package uses "native 404 handling" by now, problem solved. |
To be compatible with Neos 5.0 PSR-7 needs to be implemented.
I started adapting the code, but came to find that a simple
$response->getContent()
just returns an empty string. The real content lies in$response->getComponentParameters()
where there is aNeos\Flow\Http\Component\ReplaceHttpResponseComponent
on whoseresponse
parameter you can->getBody()->getContents()
.I'm not familiar with this, so I hope someone else can support here.