diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-05 16:49:22 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-05 16:49:48 +0200 |
commit | c0e67fa24adfa356dccdb35fad29879c39b69cb7 (patch) | |
tree | 553e1dc59dba8d168d2dbc66e8f4f1e2a85a5e1e /lib/files.php | |
parent | 70cb053e6b03e2848cb54aea72c3f8e550ece69d (diff) | |
download | nextcloud-server-c0e67fa24adfa356dccdb35fad29879c39b69cb7.tar.gz nextcloud-server-c0e67fa24adfa356dccdb35fad29879c39b69cb7.zip |
fix opening encrypted files from the browser
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/files.php b/lib/files.php index 107605fc34e..5d4d73630eb 100644 --- a/lib/files.php +++ b/lib/files.php @@ -96,6 +96,7 @@ class OC_Files { $zip=false; $filename=$dir.'/'.$files; } + @ob_end_clean(); if($zip or OC_Filesystem::is_readable($filename)){ header('Content-Disposition: attachment; filename="'.basename($filename).'"'); header('Content-Transfer-Encoding: binary'); @@ -106,7 +107,6 @@ class OC_Files { }else{ $fileData=OC_FileCache::get($filename); header('Content-Type: ' . $fileData['mimetype']); - header('Content-Length: ' . $fileData['size']); } }elseif($zip or !OC_Filesystem::file_exists($filename)){ header("HTTP/1.0 404 Not Found"); @@ -117,7 +117,6 @@ class OC_Files { header("HTTP/1.0 403 Forbidden"); die('403 Forbidden'); } - @ob_end_clean(); if($zip){ $handle=fopen($filename,'r'); if ($handle) { |