mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-31 20:53:37 +08:00
wrap etag value with double quotes
This commit is contained in:
parent
ce4acecaa8
commit
57a4549d86
@ -25,5 +25,5 @@ func (c CRC) Value() uint32 {
|
|||||||
func (n *Needle) Etag() string {
|
func (n *Needle) Etag() string {
|
||||||
bits := make([]byte, 4)
|
bits := make([]byte, 4)
|
||||||
util.Uint32toBytes(bits, uint32(n.Checksum))
|
util.Uint32toBytes(bits, uint32(n.Checksum))
|
||||||
return fmt.Sprintf("%x", bits)
|
return fmt.Sprintf("\"%x\"", bits)
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
|||||||
w.WriteHeader(http.StatusNotModified)
|
w.WriteHeader(http.StatusNotModified)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.Header().Set("Etag", "\""+etag+"\"")
|
w.Header().Set("Etag", etag)
|
||||||
if n.NameSize > 0 && filename == "" {
|
if n.NameSize > 0 && filename == "" {
|
||||||
filename = string(n.Name)
|
filename = string(n.Name)
|
||||||
dotIndex := strings.LastIndex(filename, ".")
|
dotIndex := strings.LastIndex(filename, ".")
|
||||||
|
Loading…
Reference in New Issue
Block a user