B2 gateway S3 compat: return MD5 hash as ETag from PutObject (#9183)

- B2 does actually return an MD5 hash for newly uploaded objects
  so we can use it to provide better compatibility with S3 client
  libraries that assume the ETag is the MD5 hash such as boto.
- depends on change in blazer library.
- new behaviour is only enabled if MinIO's --compat mode is active.
- behaviour for multipart uploads is unchanged (works fine as is).
This commit is contained in:
Ingmar Runge
2020-03-28 21:59:55 +01:00
committed by GitHub
parent 2c3e34f001
commit fa4d627b57
4 changed files with 38 additions and 20 deletions

2
go.mod
View File

@@ -56,7 +56,7 @@ require (
github.com/klauspost/pgzip v1.2.1
github.com/klauspost/readahead v1.3.1
github.com/klauspost/reedsolomon v1.9.3
github.com/kurin/blazer v0.5.4-0.20190613185654-cf2f27cc0be3
github.com/kurin/blazer v0.5.4-0.20200327014341-8f90a40f8af7
github.com/lib/pq v1.1.1
github.com/mattn/go-colorable v0.1.1
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect