diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-01-04 10:09:30 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-01-04 10:09:30 +0100 |
commit | 298eae9c86bff3e78a12e7f814eac93543810e85 (patch) | |
tree | 22a4e43bc1f0a96acc52d8b0d52bac3f47cdaf7b /lib | |
parent | 84ed1034b4531efcfa0e1b9e989ab021bec56b7a (diff) | |
parent | 31970ee7409ff2ed303b728ea4fd6f8d10302649 (diff) | |
download | nextcloud-server-298eae9c86bff3e78a12e7f814eac93543810e85.tar.gz nextcloud-server-298eae9c86bff3e78a12e7f814eac93543810e85.zip |
Merge pull request #13060 from dratini0/master
Fix: X-Accel-Redirect did not support custom data dir and local mounts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/private/files.php b/lib/private/files.php index 98f3c52d6c6..496ba1baff0 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -161,12 +161,11 @@ 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); @@ -182,7 +181,6 @@ class OC_Files { } if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) { - $filename = \OC::$WEBROOT . '/data' . \OC\Files\Filesystem::getRoot() . $filename; header("X-Accel-Redirect: " . $filename); } } |