diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-07-14 15:35:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-14 15:35:41 -0700 |
| commit | abeb7f65f82311adc0e6485a46de4d455bd80bba (patch) | |
| tree | b791cb22f5021c3e264d7ca25f51b07c416c22fd | |
| parent | fa610745133a344e761fe9efdde3395ea56e28ba (diff) | |
| parent | c08f6d0ff74dddc4fe54bc8bcad057b13d64b5a6 (diff) | |
| download | seaweedfs-abeb7f65f82311adc0e6485a46de4d455bd80bba.tar.xz seaweedfs-abeb7f65f82311adc0e6485a46de4d455bd80bba.zip | |
Merge pull request #3314 from shichanglin5/fix_ETag
File upload should succeed should return `ETag` instead of `Etag`
| -rw-r--r-- | weed/s3api/s3api_object_handlers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index 4ad3454ba..e49d613c4 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/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 + "\""} } } } |
