Merge pull request #14684 from nextcloud/long-etag-dav

handle long etags from dav external storage
This commit is contained in:
Roeland Jago Douma 2019-03-14 17:18:29 +01:00 committed by GitHub
commit f87bab8ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -726,7 +726,11 @@ class DAV extends Common {
return null;
}
if (isset($response['{DAV:}getetag'])) {
return trim($response['{DAV:}getetag'], '"');
$etag = trim($response['{DAV:}getetag'], '"');
if (strlen($etag) > 40) {
$etag = md5($etag);
}
return $etag;
}
return parent::getEtag($path);
}