mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +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) {
|
func setEtag(w http.ResponseWriter, etag string) {
|
||||||
if etag != "" {
|
if etag != "" {
|
||||||
if strings.HasPrefix(etag, "\"") {
|
if strings.HasPrefix(etag, "\"") {
|
||||||
w.Header().Set("ETag", etag)
|
w.Header()["ETag"] = []string{etag}
|
||||||
} else {
|
} else {
|
||||||
w.Header().Set("ETag", "\""+etag+"\"")
|
w.Header()["ETag"] = []string{"\"" + etag + "\""}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user