mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
revert volume etag
This commit is contained in:
parent
c83ab91e2e
commit
198688c717
|
@ -13,7 +13,6 @@ import (
|
||||||
"github.com/chrislusf/seaweedfs/weed/stats"
|
"github.com/chrislusf/seaweedfs/weed/stats"
|
||||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||||
"github.com/chrislusf/seaweedfs/weed/topology"
|
"github.com/chrislusf/seaweedfs/weed/topology"
|
||||||
"github.com/chrislusf/seaweedfs/weed/util"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -68,7 +67,7 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
ret.Name = string(reqNeedle.Name)
|
ret.Name = string(reqNeedle.Name)
|
||||||
}
|
}
|
||||||
ret.Size = uint32(originalSize)
|
ret.Size = uint32(originalSize)
|
||||||
ret.ETag = fmt.Sprintf("%x", util.Base64Md5ToBytes(contentMd5))
|
ret.ETag = reqNeedle.Etag()
|
||||||
ret.Mime = string(reqNeedle.Mime)
|
ret.Mime = string(reqNeedle.Mime)
|
||||||
setEtag(w, ret.ETag)
|
setEtag(w, ret.ETag)
|
||||||
w.Header().Set("Content-MD5", contentMd5)
|
w.Header().Set("Content-MD5", contentMd5)
|
||||||
|
|
Loading…
Reference in a new issue