Browse Source

merged branch snc/patch-1 (PR #1790)

Commits
-------

5219f81 Using the $status parameter instead of fixed value when creating a RedirectResponse.

Discussion
----------

Using the $status parameter instead of fixed value

I checked the usages and the optional `$status` parameter is never used, so maybe another option would be to remove the parameter completely...

---------------------------------------------------------------------------

by jaugustin at 2011/07/25 03:11:00 -0700

maybe you could test that $status is a valid redirect code

---------------------------------------------------------------------------

by stloyd at 2011/07/25 04:40:21 -0700

@jaugustin This check is already included in `RedirectResponse` class.
Fabien Potencier 14 years ago
parent
commit
37a127aca3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Symfony/Component/Security/Http/HttpUtils.php

+ 1 - 1
src/Symfony/Component/Security/Http/HttpUtils.php

@@ -54,7 +54,7 @@ class HttpUtils
             $path = $this->generateUrl($path, true);
         }
 
-        return new RedirectResponse($path, 302);
+        return new RedirectResponse($path, $status);
     }
 
     /**