Explorar el Código

Merge pull request #13060 from dratini0/master

Fix: X-Accel-Redirect did not support custom data dir and local mounts
tags/v8.0.0alpha2
Morris Jobke hace 9 años
padre
commit
298eae9c86
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1
    3
      lib/private/files.php

+ 1
- 3
lib/private/files.php Ver fichero

@@ -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);
}
}

Cargando…
Cancelar
Guardar