Project

General

Profile

Actions

Bug #65801

closed

Headers are visible if URI of pageNotFound_handling has a redirect by .haccess

Added by Stefan Froemken about 9 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-03-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello,

in Installtool of domain1 we have configured:

[FE][pageNotFound_handling] = http://domain2/notFound.html

In Server with domain2 we have an .htaccess entry which redirects all calls to HTTP automatically to HTTPS
If you now try to show f.e. a Sysfolder in Frontend then a 404 page was shown, but on top you see a header like:

HTTP/1.1 200 OK Date: Mon, 16 Mar 2015 08:35:09 GMT Server: Apache Last-Modified: Tue, 26 Aug 2014 10:32:44 GMT Accept-Ranges: bytes Content-Length: 283 Cache-Control: max-age=1800 Expires: Mon, 16 Mar 2015 09:05:09 GMT Content-Type: text/html

If I change [FE][pageNotFound_handling] to an HTTPS uri everything works like excepted.

The problem appears in TypoScriptFrontendController->pageErrorHandler

$res = GeneralUtility::getUrl($code, 1, $headerArr);
// Header and content are separated by an empty line
list($header, $content) = explode(CRLF . CRLF, $res, 2);

Here is only a check for the first header data which is in our case the redirect. So the 200 OK Status Header was moved into the content area.

Stefan


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #67136: Using pageNotFound handler with a cURL proxy can cause HTTP headers to be displayedClosed2015-05-262016-09-30

Actions
Actions

Also available in: Atom PDF