For Swift servers/accounts/containers that are configured to use RFC-compliant ETags enclosed in double quotes[1][2], rclone was mistakenly considering objects corrupted when comparing "<hash>" vs <hash>.
This could happen for operations such as sync (both ways), typically during transfer (ETag in response to PUT request`), or possibly triggering retransfers when object already present at destination (comparing object checksum in JSON formatted container listing vs. header ETag).
I have tested my patch on Swift v2.25.1 together with rclone v1.56.2 on Go 1.17.1.
This is my first time playing around with Go so if there's anything that needs to be addressed please let me know :-)
This issue was originally discussing over at the rclone forums: https://forum.rclone.org/t/intended-behavior-of-sync-and-checksum-for-swift/26743
For Swift servers/accounts/containers that are configured to use RFC-compliant ETags enclosed in double quotes[1][2], rclone was mistakenly considering objects corrupted when comparing
"<hash>"
vs<hash>
.This could happen for operations such as
sync
(both ways), typically during transfer (ETag
in response toPUT
request`), or possibly triggering retransfers when object already present at destination (comparing object checksum in JSON formatted container listing vs. header ETag).I have tested my patch on Swift v2.25.1 together with rclone v1.56.2 on Go 1.17.1. This is my first time playing around with Go so if there's anything that needs to be addressed please let me know :-)
[1] https://github.com/openstack/swift/blob/2.24.0/CHANGELOG#L9 [2] https://datatracker.ietf.org/doc/html/rfc7232#section-2.3