diff options
| author | LHHDZ <changlin.shi@ly.com> | 2022-07-14 19:45:01 +0800 |
|---|---|---|
| committer | LHHDZ <changlin.shi@ly.com> | 2022-07-14 19:45:01 +0800 |
| commit | c08f6d0ff74dddc4fe54bc8bcad057b13d64b5a6 (patch) | |
| tree | 9a4494c3ebddf95ea50697bdac2e6d0d7fc64eba | |
| parent | fba5219dab83f312de5a0b8ea7ace0e26f6e73a1 (diff) | |
| download | seaweedfs-c08f6d0ff74dddc4fe54bc8bcad057b13d64b5a6.tar.xz seaweedfs-c08f6d0ff74dddc4fe54bc8bcad057b13d64b5a6.zip | |
File upload should succeed should return `ETag` instead of `Etag`
at `/go-1.18.1/src/net/textproto/header.go:39`, header is canonicalized by `textproto.CanonicalMIMEHeaderKey`
| -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 + "\""} } } } |
