diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-04-07 15:08:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 15:08:21 +0200 |
commit | fb7f65a687ba426188148b3ebbf295ee307c7bc4 (patch) | |
tree | a9d4eb0ccff4333f0eccd0723ee94308fddf5223 /apps/dav | |
parent | 8b53b6dc9ef15c37a8c05d4ea2afee28506f0383 (diff) | |
parent | 854890a7345788684764026922b2fd2f3e6bd573 (diff) | |
download | nextcloud-server-fb7f65a687ba426188148b3ebbf295ee307c7bc4.tar.gz nextcloud-server-fb7f65a687ba426188148b3ebbf295ee307c7bc4.zip |
Merge pull request #25747 from nextcloud/XAccelBuffering
Add X-Accel-Buffering header to downloads
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 1 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 017b1d31841..180f05c0e7e 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -291,6 +291,7 @@ class FilesPlugin extends ServerPlugin { $response->addHeader('OC-Checksum', $checksum); } } + $response->addHeader('X-Accel-Buffering', 'no'); } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 201b2b863ab..777a730ffd1 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -590,9 +590,12 @@ class FilesPluginTest extends TestCase { ->willReturn($isClumsyAgent); $response - ->expects($this->once()) + ->expects($this->exactly(2)) ->method('addHeader') - ->with('Content-Disposition', $contentDispositionHeader); + ->withConsecutive( + ['Content-Disposition', $contentDispositionHeader], + ['X-Accel-Buffering', 'no'] + ); $this->plugin->httpGet($request, $response); } |