Merge pull request #22515 from owncloud/webdav_checksum_only_for_files
Only add checksum headers for 'real' files
This commit is contained in:
commit
1106c354ac
|
@ -193,11 +193,13 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
|
||||||
// adds a 'Content-Disposition: attachment' header
|
// adds a 'Content-Disposition: attachment' header
|
||||||
$response->addHeader('Content-Disposition', 'attachment');
|
$response->addHeader('Content-Disposition', 'attachment');
|
||||||
|
|
||||||
//Add OC-Checksum header
|
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
|
||||||
/** @var $node File */
|
//Add OC-Checksum header
|
||||||
$checksum = $node->getChecksum();
|
/** @var $node File */
|
||||||
if ($checksum !== null) {
|
$checksum = $node->getChecksum();
|
||||||
$response->addHeader('OC-Checksum', $checksum);
|
if ($checksum !== null) {
|
||||||
|
$response->addHeader('OC-Checksum', $checksum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue