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

makeStandardsCompliantSetsAContentLengthHeaderIfNotPresent() public method

RFC 2616 / 4.4 (Message Length)
    public function makeStandardsCompliantSetsAContentLengthHeaderIfNotPresent()
    {
        $request = Request::create(new Uri('http://localhost'));
        $response = new Response();
        $content = '
			Pat grabbed her hat
			and her fat, wooden bat
			When her friends couldn\'t play,
			Pat yelled out, "Drat!"
			But then she hit balls
			to her dog and _-at.
		';
        $response->setContent($content);
        $response->makeStandardsCompliant($request);
        $this->assertEquals(strlen($content), $response->getHeader('Content-Length'));
    }
ResponseTest