소스 검색

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 년 전
부모
커밋
37a127aca3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);
     }
 
     /**