Browse Source

set proxied request content length

pull/6118/head
chrislu 2 months ago
parent
commit
6845e25318
  1. 3
      weed/s3api/s3api_object_handlers.go

3
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 { for header, values := range r.Header {
proxyReq.Header[header] = values proxyReq.Header[header] = values
} }
if proxyReq.ContentLength == 0 && r.ContentLength != 0 {
proxyReq.ContentLength = r.ContentLength
}
// ensure that the Authorization header is overriding any previous // ensure that the Authorization header is overriding any previous
// Authorization header which might be already present in proxyReq // Authorization header which might be already present in proxyReq

Loading…
Cancel
Save