Browse Source

fix: Lost Content-Encoding metadata (#4010)

pull/4012/head
famosss 2 years ago
committed by GitHub
parent
commit
15284e2bee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/server/filer_server_handlers_write_autochunk.go

4
weed/server/filer_server_handlers_write_autochunk.go

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

Loading…
Cancel
Save