Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / http-foundation / RedirectResponse.php
index 5a775ad159f3a89b7900bb8ec13df4fac8b2a0d0..cb1c58e8999a56a62a35a45f0fd2616d8389a445 100644 (file)
@@ -41,6 +41,10 @@ class RedirectResponse extends Response
         if (!$this->isRedirect()) {
             throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
         }
+
+        if (301 == $status && !array_key_exists('cache-control', $headers)) {
+            $this->headers->remove('cache-control');
+        }
     }
 
     /**
@@ -83,7 +87,7 @@ class RedirectResponse extends Response
 <html>
     <head>
         <meta charset="UTF-8" />
-        <meta http-equiv="refresh" content="1;url=%1$s" />
+        <meta http-equiv="refresh" content="0;url=%1$s" />
 
         <title>Redirecting to %1$s</title>
     </head>