My server receives some external requests with Stream Transfer-Encoding: chunked, but I can’t get the message body
$body = $request->getBody()->getContents();
this in php 7.3 + apache
My server receives some external requests with Stream Transfer-Encoding: chunked, but I can’t get the message body
$body = $request->getBody()->getContents();
this in php 7.3 + apache
Try this instead:
$body = (string)$request->getBody();
I was unsuccessful using apache as a server, I can not capture the content of the stream.
Using the embedded php server I can receive correctly.
I think the problem is with apache or how to read the message when it is sent to the apache server
I use apache and it works great. Have you tried my example?
This error has been reported.
https://www.jeffgeerling.com/blog/2017/apache-fastcgi-proxyfcgi-and-empty-post-bodies-chunked-transfer
I’m waiting for a return from my datacenter, if you have any suggestions I appreciate
What happens if you add the BodyParsingMiddleware?
$app = AppFactory::create();
$app->addBodyParsingMiddleware();
// ...