Merge pull request #3383 from dhensby/pulls/fix-send-file-header

Fixing header case in `send_file`
This commit is contained in:
Sean Harvey 2014-08-14 10:06:22 +12:00
commit 976efd6fc2

View File

@ -395,7 +395,7 @@ class SS_HTTPRequest implements ArrayAccess {
$response = new SS_HTTPResponse($fileData);
$response->addHeader("Content-Type", "$mimeType; name=\"" . addslashes($fileName) . "\"");
// Note a IE-only fix that inspects this header in HTTP::add_cache_headers().
$response->addHeader("Content-disposition", "attachment; filename=" . addslashes($fileName));
$response->addHeader("Content-Disposition", "attachment; filename=" . addslashes($fileName));
$response->addHeader("Content-Length", strlen($fileData));
return $response;