1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-02 08:40:20 +02:00

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`
This commit is contained in:
LHHDZ 2022-07-14 19:45:01 +08:00
parent fba5219dab
commit c08f6d0ff7

View file

@ -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 + "\""}
}
}
}