summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUnpublished <unpublished@gmx.net>2021-02-22 15:59:26 +0100
committerJohn Molakvoæ (Rebase PR Action) <skjnldsv@users.noreply.github.com>2022-01-17 08:17:12 +0000
commit854890a7345788684764026922b2fd2f3e6bd573 (patch)
tree992db86db7ee3d622681b66e5b3455bcc5d6732a /lib
parent396e5cbebbcab67685315c1377067d1cc4a37add (diff)
downloadnextcloud-server-854890a7345788684764026922b2fd2f3e6bd573.tar.gz
nextcloud-server-854890a7345788684764026922b2fd2f3e6bd573.zip
Add X-Accel-Buffering header to downloads
Signed-off-by: Unpublished <unpublished@gmx.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Streamer.php1
-rw-r--r--lib/private/legacy/OC_Files.php1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Streamer.php b/lib/private/Streamer.php
index 176334b971d..80ab5a5524c 100644
--- a/lib/private/Streamer.php
+++ b/lib/private/Streamer.php
@@ -95,6 +95,7 @@ class Streamer {
* @param string $name
*/
public function sendHeaders($name) {
+ header('X-Accel-Buffering: no');
$extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar';
$fullName = $name . $extension;
$this->streamerInstance->sendHeaders($fullName);
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index d1af5b24bdd..41ac20577b2 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -98,6 +98,7 @@ class OC_Files {
}
}
header('Content-Type: '.$type, true);
+ header('X-Accel-Buffering: no');
}
/**