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:
Chris Lu
2020-03-08 15:42:44 -07:00
parent 11fceaf2f7
commit 9b3109a5d8
12 changed files with 141 additions and 254 deletions

View File

@@ -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))
}