Sent out a status text for unknown HTTP headers.

This commit is contained in:
Daniel Wehner 2015-11-18 11:39:29 +01:00 committed by Fabien Potencier
parent f11e2e9601
commit eec6fbc768
2 changed files with 2 additions and 2 deletions

View File

@ -412,7 +412,7 @@ class Response
} }
if (null === $text) { if (null === $text) {
$this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : ''; $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : 'unknown status';
return $this; return $this;
} }

View File

@ -647,7 +647,7 @@ class ResponseTest extends ResponseTestCase
array('200', null, 'OK'), array('200', null, 'OK'),
array('200', false, ''), array('200', false, ''),
array('200', 'foo', 'foo'), array('200', 'foo', 'foo'),
array('199', null, ''), array('199', null, 'unknown status'),
array('199', false, ''), array('199', false, ''),
array('199', 'foo', 'foo'), array('199', 'foo', 'foo'),
); );