From c140d4feae32d8301a8ffa0dfbbbbcd089eefd41 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Wed, 23 Oct 2013 15:49:48 +0200 Subject: [PATCH] prevent PHP from magically setting a 302 header, see http://www.php.net/manual/en/function.header.php --- src/Symfony/Component/HttpFoundation/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 70ff8f06c0fda..b32d4a3c86a46 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -332,12 +332,12 @@ public function sendHeaders() } // status - header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)); + header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); // headers foreach ($this->headers->allPreserveCase() as $name => $values) { foreach ($values as $value) { - header($name.': '.$value, false); + header($name.': '.$value, false, $this->statusCode); } }