mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
set etag in response
This commit is contained in:
parent
d5ebfd5b0c
commit
e49a38842a
|
@ -22,7 +22,7 @@ type UploadResult struct {
|
|||
Name string `json:"name,omitempty"`
|
||||
Size uint32 `json:"size,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
ETag string `json:"error,omitempty"`
|
||||
ETag string `json:"eTag,omitempty"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -45,7 +45,8 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
|||
ret.Name = string(needle.Name)
|
||||
}
|
||||
ret.Size = uint32(originalSize)
|
||||
setEtag(w, needle.Etag())
|
||||
ret.ETag = needle.Etag()
|
||||
setEtag(w, ret.ETag)
|
||||
writeJsonQuiet(w, r, httpStatus, ret)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue