mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 06:30:07 +08: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:
parent
fba5219dab
commit
c08f6d0ff7
@ -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…
Reference in New Issue
Block a user