summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-20 11:17:24 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-20 11:17:24 +0200
commit3bc312ef9a5936b13492194565d5fddc1f920e49 (patch)
tree603b60e3c8140395ab7cb3491776aabc29ea9c81 /apps
parent68b2a85ed01bed3c9d7cb9843e3b62f6ecbfaf31 (diff)
parent94ada409bbc9a0151a952b89bcfdebe32ba6c105 (diff)
downloadnextcloud-server-3bc312ef9a5936b13492194565d5fddc1f920e49.tar.gz
nextcloud-server-3bc312ef9a5936b13492194565d5fddc1f920e49.zip
Merge pull request #15401 from owncloud/response-setContentLengthHeader-stable8
[stable8] Add OC_Response::setContentLengthHeader() for Apache PHP SAPI workaround.
Diffstat (limited to 'apps')
-rw-r--r--apps/files/download.php2
-rw-r--r--apps/files_versions/download.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/download.php b/apps/files/download.php
index 664a69c5959..8d9c539284f 100644
--- a/apps/files/download.php
+++ b/apps/files/download.php
@@ -39,7 +39,7 @@ $ftype=\OC_Helper::getSecureMimeType(\OC\Files\Filesystem::getMimeType( $filenam
header('Content-Type:'.$ftype);
OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
OCP\Response::disableCaching();
-header('Content-Length: '.\OC\Files\Filesystem::filesize($filename));
+OCP\Response::setContentLengthHeader(\OC\Files\Filesystem::filesize($filename));
OC_Util::obEnd();
\OC\Files\Filesystem::readfile( $filename );
diff --git a/apps/files_versions/download.php b/apps/files_versions/download.php
index e5139450f5e..c63fde51954 100644
--- a/apps/files_versions/download.php
+++ b/apps/files_versions/download.php
@@ -38,7 +38,7 @@ $ftype = $view->getMimeType('/'.$uid.'/files/'.$filename);
header('Content-Type:'.$ftype);
OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
OCP\Response::disableCaching();
-header('Content-Length: '.$view->filesize($versionName));
+OCP\Response::setContentLengthHeader($view->filesize($versionName));
OC_Util::obEnd();