summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-07-08 09:15:52 +0200
committerGitHub <noreply@github.com>2016-07-08 09:15:52 +0200
commit488e5b1694cd6d87f42172839aaa72bd055f3dac (patch)
treee835bc9fd6d28716da6854324faa0237ae40825b /tests
parenteff3648f6038a93743ecb81613ec459eae6592f9 (diff)
downloadnextcloud-server-488e5b1694cd6d87f42172839aaa72bd055f3dac.tar.gz
nextcloud-server-488e5b1694cd6d87f42172839aaa72bd055f3dac.zip
[stable8.2] Set content type when downloading log file to force download in some browsers (#25382) (#25399)
Diffstat (limited to 'tests')
-rw-r--r--tests/settings/controller/logsettingscontrollertest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/settings/controller/logsettingscontrollertest.php b/tests/settings/controller/logsettingscontrollertest.php
index 60680ba4647..88d5d9bf93a 100644
--- a/tests/settings/controller/logsettingscontrollertest.php
+++ b/tests/settings/controller/logsettingscontrollertest.php
@@ -70,5 +70,8 @@ class LogSettingsControllerTest extends \Test\TestCase {
$response = $this->logSettingsController->download();
$this->assertInstanceOf('\OCP\AppFramework\Http\StreamResponse', $response);
+ $headers = $response->getHeaders();
+ $this->assertEquals('application/octet-stream', $headers['Content-Type']);
+ $this->assertEquals('attachment; filename="owncloud.log"', $headers['Content-Disposition']);
}
}