diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-19 10:56:43 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-19 10:56:43 +0100 |
commit | 751d3df4691b045df994cbc63a950962de6b5768 (patch) | |
tree | c8a05f270fc34fd4336ea43acd2b16689d33f0c6 /apps/dav/lib | |
parent | ae2304f23f04f1d6c84f2a049a4b0fdc0c9023c6 (diff) | |
download | nextcloud-server-751d3df4691b045df994cbc63a950962de6b5768.tar.gz nextcloud-server-751d3df4691b045df994cbc63a950962de6b5768.zip |
Only add checksum headers for files
We can only add the checksum header for real ownCloud files (so we have
a fileinfo object etc).
Diffstat (limited to 'apps/dav/lib')
-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); + } } } |