Skip to content

Commit d9119c0

Browse files
authored
Merge pull request #14694 from nextcloud/backport/14684/stable15
[stable15] handle long etags from dav external storage
2 parents d734a4b + 54b1494 commit d9119c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/private/Files/Storage/DAV.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,11 @@ public function getETag($path) {
726726
return null;
727727
}
728728
if (isset($response['{DAV:}getetag'])) {
729-
return trim($response['{DAV:}getetag'], '"');
729+
$etag = trim($response['{DAV:}getetag'], '"');
730+
if (strlen($etag) > 40) {
731+
$etag = md5($etag);
732+
}
733+
return $etag;
730734
}
731735
return parent::getEtag($path);
732736
}

0 commit comments

Comments
 (0)