diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 3a084954c4430..6efae35e9a782 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -361,9 +361,12 @@ public function testPrepareRemovesContentForHeadRequests() $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 testPrepareSetsPragmaOnHttp10Only()