Project

General

Profile

Actions

Bug #28788

closed

PageErrorHandler+curl+linux = headers output in pageNotFoundHandler

Added by Claus Due almost 13 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2011-08-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions

Also available in: Atom PDF