diff options
| author | chrislu <chris.lu@gmail.com> | 2024-10-10 13:55:32 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-10-10 13:55:32 -0700 |
| commit | 6845e253186a8de4b563e069624867dd89785b74 (patch) | |
| tree | 787e19c9025cd4b460f212aba1866495a8b48d4a | |
| parent | 35fd1e1c9af62df7ca50324a0db2983ac4af4176 (diff) | |
| download | seaweedfs-6845e253186a8de4b563e069624867dd89785b74.tar.xz seaweedfs-6845e253186a8de4b563e069624867dd89785b74.zip | |
set proxied request content length
| -rw-r--r-- | weed/s3api/s3api_object_handlers.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index 5f3631b89..54d6cc69e 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 |
