Fixed for PutObject, original issue is solved. Creating other tickets for the other things.
Some information about ETags: https://teppen.io/2018/06/23/aws_s3_etags/ We should implement the same thing for maximum compatibility.
WRT the original bug, Amazon says in the docs that the returned ETag can be compared against the MD5 of the file for the PutObject API call and that they should match. This is inconsistent with the fact that ETags are supposed to be opaque identifiers attributed by the system, but if S3 clients rely on this behaviour we have to respect it. Garage doesn't care about ETags so we can do whatever with that field.
Related: Garage currently does not implement checking of the MD5 sum of the uploaded data, which should match the Content-MD5
header. Should be implemented.