summaryrefslogtreecommitdiffstats
path: root/lib/private/files.php
diff options
context:
space:
mode:
authordratini0 <dratini0@gmail.com>2015-02-11 21:14:58 +0100
committerdratini0 <dratini0@gmail.com>2015-02-11 22:19:22 +0100
commit80032ec30130d0c941cdf6a2217406a7ac2d3c86 (patch)
tree0d1c07b7e94ded06e56060be48cfaf5aeb0a60dd /lib/private/files.php
parent99a97649f21cc9914d7eddbac68b428dc2a0da0d (diff)
downloadnextcloud-server-80032ec30130d0c941cdf6a2217406a7ac2d3c86.tar.gz
nextcloud-server-80032ec30130d0c941cdf6a2217406a7ac2d3c86.zip
Revert "removed a little duplication"
This reverts commit 31970ee7409ff2ed303b728ea4fd6f8d10302649.
Diffstat (limited to 'lib/private/files.php')
-rw-r--r--lib/private/files.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/files.php b/lib/private/files.php
index 496ba1baff0..d42ab3d1852 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -161,11 +161,12 @@ class OC_Files {
* @param false|string $filename
*/
private static function addSendfileHeader($filename) {
- $filename = \OC\Files\Filesystem::getLocalFile($filename);
if (isset($_SERVER['MOD_X_SENDFILE_ENABLED'])) {
+ $filename = \OC\Files\Filesystem::getLocalFile($filename);
header("X-Sendfile: " . $filename);
}
if (isset($_SERVER['MOD_X_SENDFILE2_ENABLED'])) {
+ $filename = \OC\Files\Filesystem::getLocalFile($filename);
if (isset($_SERVER['HTTP_RANGE']) &&
preg_match("/^bytes=([0-9]+)-([0-9]*)$/", $_SERVER['HTTP_RANGE'], $range)) {
$filelength = filesize($filename);
@@ -181,6 +182,7 @@ class OC_Files {
}
if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) {
+ $filename = \OC\Files\Filesystem::getLocalFile($filename);
header("X-Accel-Redirect: " . $filename);
}
}