aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files.php
diff options
context:
space:
mode:
authormvn23 <schopdiedwaas@gmail.com>2013-06-20 12:23:25 +0300
committermvn23 <schopdiedwaas@gmail.com>2013-06-20 12:23:25 +0300
commit3f20a080fedd47e2614c44ebe1824f2ee46bb767 (patch)
tree2638691d0967f4932980c45f3b584831af9876b0 /lib/files.php
parenta25bfa92917075d1ab26649c4d6d5bea6150e623 (diff)
downloadnextcloud-server-3f20a080fedd47e2614c44ebe1824f2ee46bb767.tar.gz
nextcloud-server-3f20a080fedd47e2614c44ebe1824f2ee46bb767.zip
Revert most changes for testing
Diffstat (limited to 'lib/files.php')
-rw-r--r--lib/files.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/files.php b/lib/files.php
index 123c87eb5ff..20ad2405fcd 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -173,18 +173,20 @@ class OC_Files {
header("X-Sendfile: " . $filename);
}
if (isset($_SERVER['MOD_X_SENDFILE2_ENABLED'])) {
- if (isset($_SERVER['HTTP_RANGE']) &&
- preg_match("/\Abytes=(?P<start>[0-9]+)-(?P<end>[0-9]*)\z/", $_SERVER['HTTP_RANGE'], $range)) {
- if ($range['end'] == "") {
- $range['end'] = filesize($filename) - 1;
- }
- header("Content-Range: bytes " . $range['start'] . "-" . $range['end'] . "/" . filesize($filename));
- header("HTTP/1.1 206 Partial content");
- header("X-Sendfile2: " . str_replace(",", "%2c", rawurlencode($filename)) . " " . $range['start'] . "-" . $range['end']);
- } else {
- header("X-Sendfile: " . $filename);
- }
+ /* if (isset($_SERVER['HTTP_RANGE']) &&
+ * preg_match("/\Abytes=(?P<start>[0-9]+)-(?P<end>[0-9]*)\z/", $_SERVER['HTTP_RANGE'], $range)) {
+ * if ($range['end'] == "") {
+ * $range['end'] = filesize($filename) - 1;
+ * }
+ * header("Content-Range: bytes " . $range['start'] . "-" . $range['end'] . "/" . filesize($filename));
+ * header("HTTP/1.1 206 Partial content");
+ * header("X-Sendfile2: " . str_replace(",", "%2c", rawurlencode($filename)) . " " . $range['start'] . "-" . $range['end']);
+ * } else {
+ */
+ header("X-Sendfile: " . $filename);
+ // }
}
+
if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) {
header("X-Accel-Redirect: " . $filename);
}