summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 59b326243ee..54d91db5c06 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -247,8 +247,10 @@ class FilesPlugin extends ServerPlugin {
$node = $this->tree->getNodeForPath($request->getPath());
if (!($node instanceof IFile)) return;
- // adds a 'Content-Disposition: attachment' header
- if ($this->downloadAttachment) {
+ // adds a 'Content-Disposition: attachment' header in case no disposition
+ // header has been set before
+ if ($this->downloadAttachment &&
+ $response->getHeader('Content-Disposition') === null) {
$filename = $node->getName();
if ($this->request->isUserAgent(
[