Skip to content

Commit

Permalink
Add X-Accel-Buffering header to downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Unpublished committed Feb 22, 2021
1 parent d090341 commit 678becd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Streamer.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function __construct(IRequest $request, int $size, int $numberOfFiles) {
* @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);
Expand Down
1 change: 1 addition & 0 deletions lib/private/legacy/OC_Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ private static function sendHeaders($filename, $name, array $rangeArray) {
}
}
header('Content-Type: '.$type, true);
header('X-Accel-Buffering: no');
}

/**
Expand Down

0 comments on commit 678becd

Please sign in to comment.