don't complain about raw headers that are not name: value

For example, HTTP/1.1 401 Unauthorized
parent 9dbb8cab
...@@ -91,6 +91,7 @@ class EcomDev_PHPUnit_Controller_Response_Http ...@@ -91,6 +91,7 @@ class EcomDev_PHPUnit_Controller_Response_Http
$this->_sentHeaders[null] = 'HTTP/1.1 ' . $this->_httpResponseCode; $this->_sentHeaders[null] = 'HTTP/1.1 ' . $this->_httpResponseCode;
foreach ($this->_headersRaw as $headerRaw) { foreach ($this->_headersRaw as $headerRaw) {
if (strpos($headerRaw, ':') === false) { continue; }
list($headerName, $headerValue) = explode(':', $headerRaw, 2); list($headerName, $headerValue) = explode(':', $headerRaw, 2);
$headerName = $this->_normalizeHeader($headerName); $headerName = $this->_normalizeHeader($headerName);
if (isset($this->_sentHeaders[$headerName])) { if (isset($this->_sentHeaders[$headerName])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment