fix put_object content-length empty

This commit is contained in:
weisd
2024-11-09 20:11:53 +08:00
parent bf71bc27b9
commit 2ed6d48a1b
2 changed files with 35 additions and 26 deletions
+2 -2
View File
@@ -588,7 +588,7 @@ impl S3 for FS {
let Some(body) = body else { return Err(s3_error!(IncompleteBody)) };
let Some(content_length) = content_length else { return Err(s3_error!(IncompleteBody)) };
let content_length = content_length.unwrap_or_default();
let mut reader = PutObjReader::new(body, content_length as usize);
@@ -677,7 +677,7 @@ impl S3 for FS {
// let upload_id =
let body = body.ok_or_else(|| s3_error!(IncompleteBody))?;
let content_length = content_length.ok_or_else(|| s3_error!(IncompleteBody))?;
let content_length = content_length.unwrap_or_default();
// mc cp step 4
let mut data = PutObjReader::new(body, content_length as usize);