Fix content type header in downloads

This commit is contained in:
Steven 2010-09-26 19:09:16 +02:00
parent 91acafe698
commit 1b5a0bb31e
1 changed files with 2 additions and 0 deletions

2
inc/lib_files.php Normal file → Executable file
View File

@ -137,8 +137,10 @@ class OC_FILES {
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
if($zip){
header('Content-Type: application/zip');
header('Content-Length: ' . filesize($filename));
}else{
header('Content-Type: ' . OC_FILESYSTEM::getMimeType($filename));
header('Content-Length: ' . OC_FILESYSTEM::filesize($filename));
}
}elseif($zip or !OC_FILESYSTEM::file_exists($filename)){