minio/pkg/etag
Andreas Auernhammer e8a12cbfdd
etag: compute ETag as MD5 for compressed single-part objects (#12375)
This commit fixes a bug causing the MinIO server to compute
the ETag of a single-part object as MD5 of the compressed
content - not as MD5 of the actual content.

This usually does not affect clients since the MinIO appended
a `-1` to indicate that the ETag belongs to a multipart object.
However, this behavior was problematic since:
 - A S3 client being very strict should reject such an ETag since
   the client uploaded the object via single-part API but got
   a multipart ETag that is not the content MD5.
 - The MinIO server leaks (via the ETag) that it compressed the
   object.

This commit addresses both cases. Now, the MinIO server returns
an ETag equal to the content MD5 for single-part objects that got
compressed.

Signed-off-by: Andreas Auernhammer <aead@mail.de>
2021-05-27 08:18:41 -07:00
..
etag.go update license change for MinIO 2021-04-23 11:58:53 -07:00
etag_test.go etag: compute ETag as MD5 for compressed single-part objects (#12375) 2021-05-27 08:18:41 -07:00
reader.go etag: compute ETag as MD5 for compressed single-part objects (#12375) 2021-05-27 08:18:41 -07:00