mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
skip object-lock headers without values (#14430)
metadata headers can have headers without values as per AWS S3 spec however, we need to skip some headers that do not have values that potentially can have empty values set.
This commit is contained in:
parent
becec6cb6b
commit
cc46a99f97
@ -126,6 +126,11 @@ func setObjectHeaders(w http.ResponseWriter, objInfo ObjectInfo, rs *HTTPRangeSp
|
|||||||
|
|
||||||
// Set all other user defined metadata.
|
// Set all other user defined metadata.
|
||||||
for k, v := range objInfo.UserDefined {
|
for k, v := range objInfo.UserDefined {
|
||||||
|
// Empty values for object lock and retention can be skipped.
|
||||||
|
if v == "" && equals(k, xhttp.AmzObjectLockMode, xhttp.AmzObjectLockRetainUntilDate) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(strings.ToLower(k), ReservedMetadataPrefixLower) {
|
if strings.HasPrefix(strings.ToLower(k), ReservedMetadataPrefixLower) {
|
||||||
// Do not need to send any internal metadata
|
// Do not need to send any internal metadata
|
||||||
// values to client.
|
// values to client.
|
||||||
|
Loading…
Reference in New Issue
Block a user