mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 04:57:24 +08:00
filer: processing all response headers, no pass through to volume server
* filer calculate MD5 etag * filer handle response headers, instread of pass it to volume servers
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package needle
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/klauspost/crc32"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
var table = crc32.MakeTable(crc32.Castagnoli)
|
||||
@@ -29,13 +29,3 @@ func (n *Needle) Etag() string {
|
||||
util.Uint32toBytes(bits, uint32(n.Checksum))
|
||||
return fmt.Sprintf("%x", bits)
|
||||
}
|
||||
|
||||
func (n *Needle) MD5() string {
|
||||
|
||||
hash := md5.New()
|
||||
|
||||
hash.Write(n.Data)
|
||||
|
||||
return fmt.Sprintf("%x", hash.Sum(nil))
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user