fix: Lost Content-Encoding metadata (#4010)

This commit is contained in:
famosss 2022-11-24 14:52:34 +08:00 committed by GitHub
parent 81624de27b
commit 15284e2bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -356,6 +356,10 @@ func SaveAmzMetaData(r *http.Request, existing map[string][]byte, isReplace bool
metadata[s3_constants.AmzStorageClass] = []byte(sc)
}
if ce := r.Header.Get("Content-Encoding"); ce != "" {
metadata["Content-Encoding"] = []byte(ce)
}
if tags := r.Header.Get(s3_constants.AmzObjectTagging); tags != "" {
for _, v := range strings.Split(tags, "&") {
tag := strings.Split(v, "=")