Neos\Flow\Tests\Unit\Http\ResponseTest::makeStandardsCompliantRemovesTheContentLengthHeaderIfTransferLengthIsDifferent PHP Method

makeStandardsCompliantRemovesTheContentLengthHeaderIfTransferLengthIsDifferent() public method

RFC 2616 / 4.4 (Message Length)
    public function makeStandardsCompliantRemovesTheContentLengthHeaderIfTransferLengthIsDifferent()
    {
        $request = Request::create(new Uri('http://localhost'));
        $response = new Response();
        $content = 'Pat grabbed her hat';
        $response->setContent($content);
        $response->setHeader('Transfer-Encoding', 'chunked');
        $response->setHeader('Content-Length', strlen($content));
        $response->makeStandardsCompliant($request);
        $this->assertFalse($response->hasHeader('Content-Length'));
    }
ResponseTest