merged 2.0

This commit is contained in:
Fabien Potencier 2011-09-19 08:53:42 +02:00
commit ed05e7a5f6
2 changed files with 4 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class HttpKernel extends BaseHttpKernel
// controller or URI?
if (0 === strpos($controller, '/')) {
$subRequest = Request::create($controller, 'get', array(), $request->cookies->all(), array(), $request->server->all());
$subRequest = Request::create($request->getUriForPath($controller), 'get', array(), $request->cookies->all(), array(), $request->server->all());
$subRequest->setSession($request->getSession());
} else {
$options['attributes']['_controller'] = $controller;

View File

@ -71,6 +71,9 @@ class HttpUtils
$this->resetLocale($request);
$path = $this->generateUrl($path, true);
}
if (0 !== strpos($path, 'http')) {
$path = $request->getUriForPath($path);
}
$newRequest = Request::create($path, 'get', array(), $request->cookies->all(), array(), $request->server->all());
if ($session = $request->getSession()) {