mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
The S3 backend relies on ETag S3 returns being equal to the MD5 of the object, but it’s not necessarily true. When the value returned clearly doesn’t look like a valid MD5 hash (length isn’t exactly 32 characters), attempt to retrieve the MD5 hash possibly stored in the metadata. We cannot always do this since user-defined metadata isn’t returned by the ListObjects call, so verifying it for each object is expensive as it requires one HEAD request per each object. This commit fixes #923. Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>