mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 21:03:32 +08:00
add etag only for PUT or large chunked uploads
This commit is contained in:
@@ -166,3 +166,11 @@ func setEtag(w http.ResponseWriter, etag string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getEtag(resp *http.Response) (etag string){
|
||||
etag = resp.Header.Get("ETag")
|
||||
if strings.HasPrefix(etag, "\"") && strings.HasSuffix(etag, "\""){
|
||||
return etag[1:len(etag)-1]
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user