Closed
Description
{{ render('foo') }} returns current action and render current template instend of action requested.
This happens because Symfony\Component\HttpFoundation\Request doesn't overwrite 'HTTP_X_ORIGINAL_URL', only 'REQUEST_URI'.
This can be fixed adding 'HTTP_X_ORIGINAL_URL' to the array used to overwrite the server variables:
Symfony\Component\HttpFoundation\Request line: 338:
$server = array_replace($defaults, $server, array(
'REQUEST_METHOD' => strtoupper($method),
'PATH_INFO' => '',
'REQUEST_URI' => $uri,
'QUERY_STRING' => $queryString,
));
fix:
$server = array_replace($defaults, $server, array(
'REQUEST_METHOD' => strtoupper($method),
'PATH_INFO' => '',
'REQUEST_URI' => $uri,
'HTTP_X_ORIGINAL_URL' => $uri,
'QUERY_STRING' => $queryString,
));