浏览代码

tweaked the previous commit

Fabien Potencier 13 年之前
父节点
当前提交
cd0aa3781b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php

+ 1 - 1
src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php

@@ -172,7 +172,7 @@ class ExceptionListener
     protected function setTargetPath(Request $request)
     {
         // session isn't required when using http basic authentication mechanism for example
-        if ($request->hasSession() && 'GET' == $request->getMethod()) {
+        if ($request->hasSession() && $request->isMethodSafe()) {
             $request->getSession()->set('_security.target_path', $request->getUri());
         }
     }