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.

set proxied request content length

chrislu6845e253186a
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index 5f3631b89c..54d6cc69e4 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -161,6 +161,9 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
for header, values := range r.Header {
proxyReq.Header[header] = values
}
+ if proxyReq.ContentLength == 0 && r.ContentLength != 0 {
+ proxyReq.ContentLength = r.ContentLength
+ }
// ensure that the Authorization header is overriding any previous
// Authorization header which might be already present in proxyReq