[HttpFoundation] add test to ensure that Content-Length is preserved on HEAD method
This commit is contained in:
parent
32947b2fc8
commit
42f0596f1a
@ -361,9 +361,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 testPrepareSetsPragmaOnHttp10Only()
|
||||
|
Reference in New Issue
Block a user