diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-19 12:36:56 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-19 12:36:56 +0100 |
commit | 1106c354acd8ebc23b1a19662232d8f6235bc96d (patch) | |
tree | 6d7b0c7160493f7f2429e6fc14155d3074784408 /apps/dav | |
parent | b93003d3fbbcf3f1181b1839411beeab14edeaa3 (diff) | |
parent | 751d3df4691b045df994cbc63a950962de6b5768 (diff) | |
download | nextcloud-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.php | 12 |
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); + } } } |