Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eec6fbc

Browse files
dawehnerfabpot
authored andcommitted
Sent out a status text for unknown HTTP headers.
1 parent f11e2e9 commit eec6fbc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ public function setStatusCode($code, $text = null)
412412
}
413413

414414
if (null === $text) {
415-
$this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : '';
415+
$this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : 'unknown status';
416416

417417
return $this;
418418
}

src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ public function getStatusCodeFixtures()
647647
array('200', null, 'OK'),
648648
array('200', false, ''),
649649
array('200', 'foo', 'foo'),
650-
array('199', null, ''),
650+
array('199', null, 'unknown status'),
651651
array('199', false, ''),
652652
array('199', 'foo', 'foo'),
653653
);

0 commit comments

Comments
 (0)