From: Thomas Mueller Date: Wed, 19 Dec 2012 10:22:01 +0000 (+0100) Subject: refs #933 send content length header - this will allow the browser to show the progre... X-Git-Tag: v5.0.0alpha1~302^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=186147d1eefaffc4c548746a30e417f7ce4d3a36;p=nextcloud-server.git refs #933 send content length header - this will allow the browser to show the progressbar --- diff --git a/lib/files.php b/lib/files.php index f8bae778ed2..69097e41074 100644 --- a/lib/files.php +++ b/lib/files.php @@ -212,6 +212,7 @@ class OC_Files { self::addSendfileHeader($filename); }else{ header('Content-Type: '.OC_Filesystem::getMimeType($filename)); + header("Content-Length: ".OC_Filesystem::filesize($filename)); $storage = OC_Filesystem::getStorage($filename); if ($storage instanceof OC_Filestorage_Local) { self::addSendfileHeader(OC_Filesystem::getLocalFile($filename)); @@ -227,8 +228,6 @@ class OC_Files { die('403 Forbidden'); } if($only_header) { - if(!$zip) - header("Content-Length: ".OC_Filesystem::filesize($filename)); return ; } if($zip) {