X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fhttp-foundation%2FRedirectResponse.php;h=01681dcdf787a1314c716bd6051b1cfc0f69c954;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=5a775ad159f3a89b7900bb8ec13df4fac8b2a0d0;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/http-foundation/RedirectResponse.php b/vendor/symfony/http-foundation/RedirectResponse.php index 5a775ad15..01681dcdf 100644 --- a/vendor/symfony/http-foundation/RedirectResponse.php +++ b/vendor/symfony/http-foundation/RedirectResponse.php @@ -41,10 +41,20 @@ 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'); + } } /** - * {@inheritdoc} + * Factory method for chainability. + * + * @param string $url The url to redirect to + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return static */ public static function create($url = '', $status = 302, $headers = array()) { @@ -83,7 +93,7 @@ class RedirectResponse extends Response - + Redirecting to %1$s