runtime
runtime copied to clipboard
[Swoole] Sub-request does not receive parent request headers
These changes allow parent request headers to be taken into sub-request when creating it.
One of the popular features of Symfony and Twig is the ability to render a controller from a template, but this causes the creation of a sub-request and the result may not be correct because the sub-request will be created without taking the headers from the parent request.
Please look Symfony\Component\HttpFoundation\Request at line 279 and you will understand that the headers are taken from $this->server->getHeaders().