mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
ignore x-amz-storage-class when its set to STANDARD (#19154)
fixes #19135
This commit is contained in:
@@ -35,6 +35,7 @@ import (
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/minio/minio/internal/bucket/lifecycle"
|
||||
"github.com/minio/minio/internal/bucket/replication"
|
||||
"github.com/minio/minio/internal/config/storageclass"
|
||||
xhttp "github.com/minio/minio/internal/http"
|
||||
"github.com/minio/minio/internal/logger"
|
||||
"github.com/minio/pkg/v2/env"
|
||||
@@ -639,6 +640,9 @@ func (j xlMetaV2Object) ToFileInfo(volume, path string, allParts bool) (FileInfo
|
||||
if equals(k, xhttp.AmzMetaUnencryptedContentLength, xhttp.AmzMetaUnencryptedContentMD5) {
|
||||
continue
|
||||
}
|
||||
if equals(k, "x-amz-storage-class") && v == storageclass.STANDARD {
|
||||
continue
|
||||
}
|
||||
|
||||
fi.Metadata[k] = v
|
||||
}
|
||||
@@ -655,6 +659,9 @@ func (j xlMetaV2Object) ToFileInfo(volume, path string, allParts bool) (FileInfo
|
||||
continue
|
||||
}
|
||||
}
|
||||
if equals(k, "x-amz-storage-class") && string(v) == storageclass.STANDARD {
|
||||
continue
|
||||
}
|
||||
switch {
|
||||
case strings.HasPrefix(strings.ToLower(k), ReservedMetadataPrefixLower), equals(k, VersionPurgeStatusKey):
|
||||
fi.Metadata[k] = string(v)
|
||||
|
||||
Reference in New Issue
Block a user