From 0b8baf846f79eb41d6abd19f27ecae1cf4723499 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 11 Feb 2013 18:56:52 +0100 Subject: [PATCH] don't complain about raw headers that are not name: value For example, HTTP/1.1 401 Unauthorized --- .../community/EcomDev/PHPUnit/Controller/Response/Http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/community/EcomDev/PHPUnit/Controller/Response/Http.php b/app/code/community/EcomDev/PHPUnit/Controller/Response/Http.php index 9044155f..428ad997 100644 --- a/app/code/community/EcomDev/PHPUnit/Controller/Response/Http.php +++ b/app/code/community/EcomDev/PHPUnit/Controller/Response/Http.php @@ -91,6 +91,7 @@ public function sendHeaders() $this->_sentHeaders[null] = 'HTTP/1.1 ' . $this->_httpResponseCode; foreach ($this->_headersRaw as $headerRaw) { + if (strpos($headerRaw, ':') === false) { continue; } list($headerName, $headerValue) = explode(':', $headerRaw, 2); $headerName = $this->_normalizeHeader($headerName); if (isset($this->_sentHeaders[$headerName])) { @@ -224,4 +225,4 @@ public function canSendHeaders($throw = false) return $this->_sentHeaders === null; } -} \ No newline at end of file +}