summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-19 12:36:56 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-19 12:36:56 +0100
commit1106c354acd8ebc23b1a19662232d8f6235bc96d (patch)
tree6d7b0c7160493f7f2429e6fc14155d3074784408 /apps/dav
parentb93003d3fbbcf3f1181b1839411beeab14edeaa3 (diff)
parent751d3df4691b045df994cbc63a950962de6b5768 (diff)
downloadnextcloud-server-1106c354acd8ebc23b1a19662232d8f6235bc96d.tar.gz
nextcloud-server-1106c354acd8ebc23b1a19662232d8f6235bc96d.zip
Merge pull request #22515 from owncloud/webdav_checksum_only_for_files
Only add checksum headers for 'real' files
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/connector/sabre/filesplugin.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/dav/lib/connector/sabre/filesplugin.php b/apps/dav/lib/connector/sabre/filesplugin.php
index 2e913ee1077..eb9116d219b 100644
--- a/apps/dav/lib/connector/sabre/filesplugin.php
+++ b/apps/dav/lib/connector/sabre/filesplugin.php
@@ -193,11 +193,13 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
// adds a 'Content-Disposition: attachment' header
$response->addHeader('Content-Disposition', 'attachment');
- //Add OC-Checksum header
- /** @var $node File */
- $checksum = $node->getChecksum();
- if ($checksum !== null) {
- $response->addHeader('OC-Checksum', $checksum);
+ if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
+ //Add OC-Checksum header
+ /** @var $node File */
+ $checksum = $node->getChecksum();
+ if ($checksum !== null) {
+ $response->addHeader('OC-Checksum', $checksum);
+ }
}
}