Browse Source

merged branch ornicar/redirectResponseIndentation (PR #1589)

Commits
-------

6c736c9 Fix RedirectResponse HTML indentation and constructor phpDoc

Discussion
----------

Fix RedirectResponse HTML indentation and constructor phpDoc

Removes extra indents from the redirection response content.
Fabien Potencier 14 years ago
parent
commit
2a5bf56a3a
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/Symfony/Component/HttpFoundation/RedirectResponse.php

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

@@ -24,7 +24,7 @@ class RedirectResponse extends Response
      * @param string  $url    The URL to redirect to
      * @param integer $status The status code (302 by default)
      *
-     * @see http://tools.ietf.org/html/rfc2616#section-10.3.5
+     * @see http://tools.ietf.org/html/rfc2616#section-10.3
      */
     public function __construct($url, $status = 302)
     {
@@ -34,14 +34,14 @@ class RedirectResponse extends Response
 
         parent::__construct(
             sprintf('<html>
-                <head>
-                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-                    <meta http-equiv="refresh" content="1;url=%1$s" />
-                </head>
-                <body>
-                    Redirecting to <a href="%1$s">%1$s</a>.
-                </body>
-            </html>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')),
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <meta http-equiv="refresh" content="1;url=%1$s" />
+    </head>
+    <body>
+        Redirecting to <a href="%1$s">%1$s</a>.
+    </body>
+</html>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')),
             $status,
             array('Location' => $url)
         );