diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 1655cdf099..24fa653ba8 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -418,9 +418,12 @@ class ResponseTest extends ResponseTestCase $response = new Response('foo'); $request = Request::create('/', 'HEAD'); + $length = 12345; + $response->headers->set('Content-Length', $length); $response->prepare($request); $this->assertEquals('', $response->getContent()); + $this->assertEquals($length, $response->headers->get('Content-Length'), 'Content-Length should be as if it was GET; see RFC2616 14.13'); } public function testPrepareRemovesContentForInformationalResponse()