Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSteven <wokste@gmail.com>2010-09-26 21:09:16 +0400
committerSteven <wokste@gmail.com>2010-09-26 21:09:16 +0400
commit1b5a0bb31e9af496fd1bea3f20ec5c925f01a923 (patch)
tree37d82262b0f677008551f4ace5174f1c5408f672 /inc
parent91acafe6984e4e8602769375dbd6cde619e551bf (diff)
Fix content type header in downloads
Diffstat (limited to 'inc')
-rwxr-xr-x[-rw-r--r--]inc/lib_files.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/lib_files.php b/inc/lib_files.php
index 009de854d3f..94eff9ce59c 100644..100755
--- a/inc/lib_files.php
+++ b/inc/lib_files.php
@@ -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)){