Skip to content

Commit

Permalink
merged 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 19, 2011
2 parents 184bbe7 + b635dca commit ed05e7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function render($controller, array $options = array())

// 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;
Expand Down
3 changes: 3 additions & 0 deletions src/Symfony/Component/Security/Http/HttpUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ public function createRequest(Request $request, $path)
$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()) {
Expand Down

0 comments on commit ed05e7a

Please sign in to comment.