]> source.dussan.org Git - nextcloud-server.git/commitdiff
refs #933 send content length header - this will allow the browser to show the progre...
authorThomas Mueller <thomas.mueller@tmit.eu>
Wed, 19 Dec 2012 10:22:01 +0000 (11:22 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Wed, 19 Dec 2012 10:22:01 +0000 (11:22 +0100)
lib/files.php

index f8bae778ed2851056fa48262e4dfa3e548308e6f..69097e41074ce5545b3b9d37c19880c88f6ef69f 100644 (file)
@@ -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) {