[BUGFIX] Don't send HTTP headers in CLI context 54/29554/2
authorGabe Blair <gabe@castironcoding.com>
Thu, 17 Apr 2014 20:26:42 +0000 (13:26 -0700)
committerMarkus Klein <klein.t3@mfc-linz.at>
Mon, 5 May 2014 21:34:12 +0000 (23:34 +0200)
Resolves: #58029
Releases: 6.2
Change-Id: If2a5f41e8524c457a20dec810f711f546d4fbb8c
Reviewed-on: https://review.typo3.org/29554
Reviewed-by: Stefan Neufeind
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php

index 05ed944..a34b11c 100644 (file)
@@ -487,7 +487,7 @@ abstract class AbstractUserAuthentication {
                // Make certain that NO user is set initially
                $this->user = NULL;
                // Set all possible headers that could ensure that the script is not cached on the client-side
-               if ($this->sendNoCacheHeaders) {
+               if ($this->sendNoCacheHeaders && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
                        header('Expires: 0');
                        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
                        $cacheControlHeader = 'no-cache, must-revalidate';