Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

check request header not part header for content-encoding

Kimbsen6b1e93ba0b8a
diff --git a/weed/storage/needle/needle_parse_upload.go b/weed/storage/needle/needle_parse_upload.go
index 6dd61821f3..3fb1c09683 100644
--- a/weed/storage/needle/needle_parse_upload.go
+++ b/weed/storage/needle/needle_parse_upload.go
@@ -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)