Index: typo3/install/index.php =================================================================== --- typo3/install/index.php (date 1312309575000) +++ typo3/install/index.php (revision ) @@ -121,8 +121,7 @@ ); // Output the warning message and exit header('Content-Type: text/html; charset=utf-8'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + t3lib_utility_Http::sendNoCacheHeaders(); echo $content; exit(); } Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (date 1312309575000) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (revision ) @@ -3406,18 +3406,15 @@ 'Cache-Control: max-age='.($this->cacheExpires - $GLOBALS['EXEC_TIME']), // no-cache 'Pragma: public', ); + // Send headers: + foreach($headers as $hL) { + header($hL); + } $this->isClientCachable = TRUE; } else { - // Build headers: - $headers = array( - #'Last-Modified: '.gmdate('D, d M Y H:i:s T', $this->register['SYS_LASTCHANGED']), - #'ETag: '.md5($this->content), - #'Cache-Control: no-cache', - #'Pragma: no-cache', - 'Cache-Control: private', // Changed to this according to Ole Tange, FI.dk - ); + t3lib_utility_Http::sendNoCacheHeaders(); $this->isClientCachable = FALSE; @@ -3435,12 +3432,7 @@ } } } - - // Send headers: - foreach($headers as $hL) { - header($hL); - } + } - } /** * Reporting status whether we can send cache control headers for proxy caching or publishing to static files Index: t3lib/utility/class.t3lib_utility_http.php =================================================================== --- t3lib/utility/class.t3lib_utility_http.php (date 1312309575000) +++ t3lib/utility/class.t3lib_utility_http.php (revision ) @@ -97,6 +97,34 @@ exit; } + + + /** + * Sends cache control headers which disable client caching. + * + * Prevent error message in IE when using a https connection, + * see http://support.microsoft.com/kb/323308/en-us + * + * @static + * @return void + * @since 4.6 + * @see http://forge.typo3.org/issues/24125 + */ + public static function sendNoCacheHeaders() { + $cacheControl = 'no-cache, must-revalidate'; + $pragma = 'no-cache'; + + $clientInfo = t3lib_div::clientInfo(); + if (($clientInfo['BROWSER'] === 'msie') && t3lib_div::getIndpEnv('TYPO3_SSL')) { + // Some IEs can not handle no-cache + $cacheControl = 'must-revalidate'; + // IE needs "Pragma: private" if SSL connection + $pragma = 'private'; -} + } + header('Cache-Control: ' . $cacheControl); + header('Pragma: ' . $pragma); + } +} + ?> \ No newline at end of file Index: t3lib/class.t3lib_userauth.php =================================================================== --- t3lib/class.t3lib_userauth.php (date 1312309575000) +++ t3lib/class.t3lib_userauth.php (revision ) @@ -246,27 +246,9 @@ if ($this->sendNoCacheHeaders) { header('Expires: 0'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - - $cacheControlHeader = 'no-cache, must-revalidate'; - $pragmaHeader = 'no-cache'; - - // Prevent error message in IE when using a https connection - // see http://forge.typo3.org/issues/24125 - $clientInfo = t3lib_div::clientInfo(); - if (($clientInfo['BROWSER'] === 'msie') && t3lib_div::getIndpEnv('TYPO3_SSL')) { - - // Some IEs can not handle no-cache - // see http://support.microsoft.com/kb/323308/en-us - $cacheControlHeader = 'must-revalidate'; - - // IE needs "Pragma: private" if SSL connection - $pragmaHeader = 'private'; + t3lib_utility_Http::sendNoCacheHeaders(); - } + } - header('Cache-Control: ' . $cacheControlHeader); - header('Pragma: ' . $pragmaHeader); - } - // Set $this->gc_time if not explicitely specified if ($this->gc_time == 0) { $this->gc_time = ($this->auth_timeout_field == 0 ? 86400 : $this->auth_timeout_field); // Default to 1 day if $this->auth_timeout_field is 0 Index: typo3/sysext/form/Classes/View/Wizard/Load.php =================================================================== --- typo3/sysext/form/Classes/View/Wizard/Load.php (date 1312309575000) +++ typo3/sysext/form/Classes/View/Wizard/Load.php (revision ) @@ -80,8 +80,7 @@ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . 'GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + t3lib_utility_Http::sendNoCacheHeaders(); header('Content-Length: '.strlen($json)); header('Content-Type: application/json; charset=utf-8'); header('Content-Transfer-Encoding: 8bit'); Index: typo3/sysext/install/mod/class.tx_install.php =================================================================== --- typo3/sysext/install/mod/class.tx_install.php (date 1312309575000) +++ typo3/sysext/install/mod/class.tx_install.php (revision ) @@ -171,8 +171,7 @@ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Expires: 0'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + t3lib_utility_Http::sendNoCacheHeaders(); } // **************************** @@ -7770,8 +7769,7 @@ ); // Output the warning message and exit header('Content-Type: text/html; charset=utf-8'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + t3lib_utility_Http::sendNoCacheHeaders(); echo $content; exit(); } Index: typo3/sysext/form/Classes/View/Wizard/Save.php =================================================================== --- typo3/sysext/form/Classes/View/Wizard/Save.php (date 1312309575000) +++ typo3/sysext/form/Classes/View/Wizard/Save.php (revision ) @@ -87,8 +87,7 @@ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . 'GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + t3lib_utility_Http::sendNoCacheHeaders(); header('Content-Length: '.strlen($json)); header('Content-Type: application/json; charset=utf-8'); header('Content-Transfer-Encoding: 8bit'); Index: typo3/sysext/install/mod/class.tx_install_ajax.php =================================================================== --- typo3/sysext/install/mod/class.tx_install_ajax.php (date 1312309575000) +++ typo3/sysext/install/mod/class.tx_install_ajax.php (revision ) @@ -142,8 +142,7 @@ // see RFC 2616 // see Microsoft Knowledge Base #234067 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + t3lib_utility_Http::sendNoCacheHeaders(); header('Expires: -1'); } }