diff --git a/cmd/api-headers.go b/cmd/api-headers.go index 24c044150..69d304060 100644 --- a/cmd/api-headers.go +++ b/cmd/api-headers.go @@ -24,6 +24,7 @@ import ( "net/http" "net/url" "strconv" + "strings" "time" "github.com/minio/minio/cmd/crypto" @@ -81,6 +82,10 @@ func setObjectHeaders(w http.ResponseWriter, objInfo ObjectInfo, rs *HTTPRangeSp w.Header()[xhttp.ETag] = []string{"\"" + objInfo.ETag + "\""} } + if strings.Contains(objInfo.ETag, "-") && len(objInfo.Parts) > 0 { + w.Header().Set(xhttp.AmzMpPartsCount, strconv.Itoa(len(objInfo.Parts))) + } + if objInfo.ContentType != "" { w.Header().Set(xhttp.ContentType, objInfo.ContentType) } diff --git a/cmd/http/headers.go b/cmd/http/headers.go index ac24feb93..c8f34cd1c 100644 --- a/cmd/http/headers.go +++ b/cmd/http/headers.go @@ -77,6 +77,9 @@ const ( AmzObjectLockLegalHold = "X-Amz-Object-Lock-Legal-Hold" AmzObjectLockBypassGovernance = "X-Amz-Bypass-Governance-Retention" + // Multipart parts count + AmzMpPartsCount = "x-amz-mp-parts-count" + // Dummy putBucketACL AmzACL = "x-amz-acl"