mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +00:00
fix put_object content-length empty
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user