summaryrefslogtreecommitdiffstats
path: root/tests/Settings/Controller/LogSettingsControllerTest.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-07-06 22:47:16 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-07-06 22:47:16 +0200
commitd769e718a58ff76a85f032913728936d77581452 (patch)
tree00ebfbeb8d5a153488d141c25271125b6c1ebd45 /tests/Settings/Controller/LogSettingsControllerTest.php
parentdc21a38a8598f1efe2ee43ec5648b49f7b7853fd (diff)
downloadnextcloud-server-d769e718a58ff76a85f032913728936d77581452.tar.gz
nextcloud-server-d769e718a58ff76a85f032913728936d77581452.zip
Set content type when downloading log file to force download in some browsers (#25382)
Diffstat (limited to 'tests/Settings/Controller/LogSettingsControllerTest.php')
-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 092c04aecc7..1660369fafe 100644
--- a/tests/Settings/Controller/LogSettingsControllerTest.php
+++ b/tests/Settings/Controller/LogSettingsControllerTest.php
@@ -71,5 +71,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']);
}
}