Parcourir la source

Redirects are now absolute

According to w3c locations need to be absolute:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
Thorsten Hallwas il y a 13 ans
Parent
commit
352e8f583c

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php

@@ -45,7 +45,7 @@ class RedirectController extends ContainerAware
         $attributes = $this->container->get('request')->attributes->all();
         unset($attributes['_route'], $attributes['route'], $attributes['permanent'] );
 
-        return new RedirectResponse($this->container->get('router')->generate($route, $attributes), $permanent ? 301 : 302);
+        return new RedirectResponse($this->container->get('router')->generate($route, $attributes, true), $permanent ? 301 : 302);
     }
 
     /**