Skip to content

Commit 352e8f5

Browse files
stepotronicfabpot
authored andcommitted
Redirects are now absolute
According to w3c locations need to be absolute: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
1 parent 9a355e9 commit 352e8f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function redirectAction($route, $permanent = false)
4545
$attributes = $this->container->get('request')->attributes->all();
4646
unset($attributes['_route'], $attributes['route'], $attributes['permanent'] );
4747

48-
return new RedirectResponse($this->container->get('router')->generate($route, $attributes), $permanent ? 301 : 302);
48+
return new RedirectResponse($this->container->get('router')->generate($route, $attributes, true), $permanent ? 301 : 302);
4949
}
5050

5151
/**

0 commit comments

Comments
 (0)