浏览代码

HTTP 1.1 / RFC 2616 - Make Redirect response HTTP body having a HTML body.

Tom Klingenberg 14 年之前
父节点
当前提交
db37bbb189
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/HttpFoundation/RedirectResponse.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/RedirectResponse.php

@@ -33,7 +33,7 @@ class RedirectResponse extends Response
         }
 
         parent::__construct(
-            sprintf('<html><head><meta http-equiv="refresh" content="1;url=%s"/></head></html>', htmlspecialchars($url, ENT_QUOTES)),
+            sprintf('<html><head><meta http-equiv="refresh" content="1;url=%s"/></head><body>Redirect to <a href="%1$s">%1$s</a>.</body></html>', htmlspecialchars($url, ENT_QUOTES)),
             $status,
             array('Location' => $url)
         );