From a240480b944196147d15c2fef8a651d22319455e Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 21 Jul 2023 19:33:24 -0500 Subject: [PATCH] Add content-length header when completing multipart requests --- src/store/object_store.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/object_store.rs b/src/store/object_store.rs index 1aaef1d..f4bfeff 100644 --- a/src/store/object_store.rs +++ b/src/store/object_store.rs @@ -582,7 +582,12 @@ impl ObjectStore { let (req, action) = self.build_request_inner(action); - req.body(action.body()).send().await + let body: Vec = action.body().into(); + + req.header(CONTENT_LENGTH, body.len()) + .body(body) + .send() + .await } fn create_abort_multipart_request(