fix: web handlers to enforce replication (#10249)

This PR also preserves source ETag for replication
This commit is contained in:
poornas authored and GitHub committed 2020-08-12 17:32:24 -07:00
1 parent 34253aa595
commit 79e21601b0
10 files changed
+109 -35

No files matched your search

+3 -2
View File
@@ -710,8 +710,9 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
Hash: bitrotWriterSum(w),
})
}
opts.UserDefined["etag"] = r.MD5CurrentHexString()
if opts.UserDefined["etag"] == "" {
opts.UserDefined["etag"] = r.MD5CurrentHexString()
}
// Guess content-type from the extension if possible.
if opts.UserDefined["content-type"] == "" {