fix: case-insensitive lookups for metadata (#11489)

continuation of #11487, with more changes
This commit is contained in:
Harshavardhana
2021-02-08 18:12:28 -08:00
committed by GitHub
parent f9c5636c2d
commit 68d299e719
6 changed files with 69 additions and 41 deletions

View File

@@ -1279,8 +1279,8 @@ func (web *webAPIHandlers) Upload(w http.ResponseWriter, r *http.Request) {
return
}
if retentionMode != "" {
opts.UserDefined[xhttp.AmzObjectLockMode] = string(retentionMode)
opts.UserDefined[xhttp.AmzObjectLockRetainUntilDate] = retentionDate.UTC().Format(iso8601TimeFormat)
opts.UserDefined[strings.ToLower(xhttp.AmzObjectLockMode)] = string(retentionMode)
opts.UserDefined[strings.ToLower(xhttp.AmzObjectLockRetainUntilDate)] = retentionDate.UTC().Format(iso8601TimeFormat)
}
objInfo, err := putObject(GlobalContext, bucket, object, pReader, opts)