diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index 503ccef7831d2..5684c3ceedf60 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -70,7 +70,6 @@ public function prepare(Request $request) { if ('1.0' != $request->server->get('SERVER_PROTOCOL')) { $this->setProtocolVersion('1.1'); - $this->headers->set('Transfer-Encoding', 'chunked'); } $this->headers->set('Cache-Control', 'no-cache'); diff --git a/tests/Symfony/Tests/Component/HttpFoundation/StreamedResponseTest.php b/tests/Symfony/Tests/Component/HttpFoundation/StreamedResponseTest.php index 308a4651fb528..e58e844eec44f 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/StreamedResponseTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/StreamedResponseTest.php @@ -33,7 +33,7 @@ public function testPrepareWith11Protocol() $response->prepare($request); $this->assertEquals('1.1', $response->getProtocolVersion()); - $this->assertEquals('chunked', $response->headers->get('Transfer-Encoding')); + $this->assertNotEquals('chunked', $response->headers->get('Transfer-Encoding'), 'Apache assumes responses with a Transfer-Encoding header set to chunked to already be encoded.'); $this->assertEquals('no-cache, private', $response->headers->get('Cache-Control')); }