[BUGFIX] Last-Modified response header broken by design 65/38265/3
authorPatrick Broens <patrick@patrickbroens.nl>
Thu, 26 Mar 2015 18:48:28 +0000 (19:48 +0100)
committerAndreas Fernandez <andreas.fernandez@aspedia.de>
Thu, 26 Mar 2015 19:36:14 +0000 (20:36 +0100)
The Last-Modifed header needs to change whenever there is a change
related to that page. Not only the page properties or records located
on that page, but every change which should be reflected on that page,
like menus, TypoScript or layout. Currently this is not happening and
has huge impact to make it work.

This patch removes the Last-Modified response header. The ETag response
header has kind of the same function, so no harm is done by deleting
Last-Modified.

Resolves: #63927
Releases: master, 6.2
Change-Id: Ic5d14225c2f90cc63e1c4413d5426565ea5e1e41
Reviewed-on: http://review.typo3.org/38265
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 893ae11..cfd97bb 100644 (file)
@@ -3616,7 +3616,6 @@ class TypoScriptFrontendController {
                if ($doCache && !$this->beUserLogin && !$this->doWorkspacePreview() && $loginsDeniedCfg) {
                        // Build headers:
                        $headers = array(
-                               'Last-Modified: ' . gmdate('D, d M Y H:i:s T', $this->register['SYS_LASTCHANGED']),
                                'Expires: ' . gmdate('D, d M Y H:i:s T', $this->cacheExpires),
                                'ETag: "' . md5($this->content) . '"',
                                'Cache-Control: max-age=' . ($this->cacheExpires - $GLOBALS['EXEC_TIME']),