Issue Bug Rejected

#28788PageErrorHandler+curl+linux = headers output in pageNotFoundHandler

Claus Due 08/05/11, 20:35 updated 01/06/15, 21:14

Description

As topic says, if using pageNotFoundHandler set to fetch a page using CURL, then headers from the request are output to the client because of an incorrect assumption in:

typo3/sysext/cms/tslib/class.tslib_fe.php line 1481/4760 (31%), col 59/76 
                        // Header and content are separated by an empty line
                        list($header, $content) = explode(CRLF . CRLR, $res, 2);

When on linux, CRLF is not used to separate request header and body in CURL returns. Instead, a universal constant must be used: PHP_EOL which is cross-platform.

typo3/sysext/cms/tslib/class.tslib_fe.php line 1481/4760 (31%), col 59/76 
                        // Header and content are separated by an empty line
                        list($header, $content) = explode(PHP_EOL . PHP_EOL, $res, 2);

Noticed on 4.5.3 and 4.6-beta1.

Reviews 1