BUGFIX Fixed saving of files in IE6/IE7 in SS_HTTPRequest::send_file() by adding custom "Cache-Control" HTTP headers

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114136 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-11-24 06:23:50 +00:00
parent ab563c1418
commit 7be01d3d10

View File

@ -278,6 +278,10 @@ class SS_HTTPRequest implements ArrayAccess {
$response->addHeader("Content-Length", strlen($fileData));
$response->addHeader("Pragma", ""); // Necessary because IE has issues sending files over SSL
if(strstr($_SERVER["HTTP_USER_AGENT"],"MSIE") == true) {
$response->addHeader('Cache-Control', 'max-age=3, must-revalidate'); // Workaround for IE6 and 7
}
return $response;
}