mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
check request header not part header for content-encoding
This commit is contained in:
parent
38626cb584
commit
6b1e93ba0b
|
@ -140,7 +140,7 @@ func parseMultipart(r *http.Request, sizeLimit int64, pu *ParsedUpload) (e error
|
|||
|
||||
reader := io.LimitReader(part, sizeLimit+1)
|
||||
if expectedChecksum := r.Header.Get("Content-MD5"); expectedChecksum != "" {
|
||||
if part.Header.Get("Content-Encoding") == "gzip" {
|
||||
if r.Header.Get("Content-Encoding") == "gzip" {
|
||||
gr, err := gzip.NewReader(reader)
|
||||
if err != nil {
|
||||
e = fmt.Errorf("Content-Encoding == gzip but content was not gzipped: %s", err)
|
||||
|
|
Loading…
Reference in a new issue