[HttpFoundation] status 201 is allowed to have a body
This commit is contained in:
parent
e96b018805
commit
1761f64023
|
@ -1182,7 +1182,7 @@ class Response
|
|||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
return in_array($this->statusCode, array(201, 204, 304));
|
||||
return in_array($this->statusCode, array(204, 304));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -578,7 +578,7 @@ class ResponseTest extends ResponseTestCase
|
|||
|
||||
public function testIsEmpty()
|
||||
{
|
||||
foreach (array(201, 204, 304) as $code) {
|
||||
foreach (array(204, 304) as $code) {
|
||||
$response = new Response('', $code);
|
||||
$this->assertTrue($response->isEmpty());
|
||||
}
|
||||
|
|
Reference in New Issue