[BUGFIX] CSV-Download not working in IE and HTTPS backend
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / Classes / RecordList / DatabaseRecordList.php
index c8f1322..8d6506c 100644 (file)
@@ -1581,9 +1581,11 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
                // Setting filename:
                $filename = $prefix . '_' . date('dmy-Hi') . '.csv';
                // Creating output header:
-               $mimeType = 'application/octet-stream';
-               header('Content-Type: ' . $mimeType);
+               header('Content-Type: application/octet-stream');
                header('Content-Disposition: attachment; filename=' . $filename);
+               // Cache-Control header is needed here to solve an issue with browser IE and
+               // versions lower then 9. See for more information: http://support.microsoft.com/kb/323308
+               header("Cache-Control: ''");
                // Printing the content of the CSV lines:
                echo implode(chr(13) . chr(10), $this->csvLines);
                // Exits: