[BUGFIX] Remove native header() call in DocumentTemplate 85/61285/2
authorBenni Mack <benni@typo3.org>
Sat, 13 Jul 2019 14:40:45 +0000 (16:40 +0200)
committerDaniel Goerz <daniel.goerz@posteo.de>
Sat, 13 Jul 2019 20:14:57 +0000 (22:14 +0200)
In DocumentTemplate there is always one header call
to define that everything is HTML and UTF-8.

Since we do PSR-7 in Backend Context, this should be handled
by the Response object, which we already do.

This should normally be a bugfix for existing stable versions,
although I'm very unsure on how this could affect any side-effects
where extensions rely on this behavior for years (!) already, so
this is master-only.

OTOH this change should not affect anything in regular BE
modules as they work with PSR-7 since TYPO3 v7 already.

Resolves: #88743
Releases: master
Change-Id: I20fb4844ca661c47eb1d56b6d20a8f2c58b17796
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61285
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>

index 69ae017..ae2152d 100644 (file)
@@ -417,7 +417,6 @@ function jumpToUrl(URL) {
         $headerStart = '<!DOCTYPE html>';
-        header('Content-Type:text/html;charset=utf-8');
         $this->pageRenderer->setMetaTag('name', 'generator', $this->generator());
         $this->pageRenderer->setMetaTag('name', 'robots', 'noindex,follow');