Browse Source

Merge pull request #3314 from shichanglin5/fix_ETag

File upload should succeed should return `ETag` instead of `Etag`
pull/3318/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
abeb7f65f8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/s3api/s3api_object_handlers.go

4
weed/s3api/s3api_object_handlers.go

@ -445,9 +445,9 @@ func (s3a *S3ApiServer) putToFiler(r *http.Request, uploadUrl string, dataReader
func setEtag(w http.ResponseWriter, etag string) {
if etag != "" {
if strings.HasPrefix(etag, "\"") {
w.Header().Set("ETag", etag)
w.Header()["ETag"] = []string{etag}
} else {
w.Header().Set("ETag", "\""+etag+"\"")
w.Header()["ETag"] = []string{"\"" + etag + "\""}
}
}
}

Loading…
Cancel
Save