mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-28 00:58:59 +00:00
fix get s3 body bytes use store_all_unlimited
This commit is contained in:
@@ -33,8 +33,13 @@ impl Operation for UpdateGroupMembers {
|
||||
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle UpdateGroupMembers");
|
||||
|
||||
let Some(body) = req.input.bytes() else {
|
||||
return Err(s3_error!(InvalidRequest, "get body failed"));
|
||||
let mut input = req.input;
|
||||
let body = match input.store_all_unlimited().await {
|
||||
Ok(b) => b,
|
||||
Err(e) => {
|
||||
warn!("get body failed, e: {:?}", e);
|
||||
return Err(s3_error!(InvalidRequest, "get body failed"));
|
||||
}
|
||||
};
|
||||
|
||||
let args: GroupAddRemove = serde_json::from_slice(&body)
|
||||
|
||||
@@ -32,8 +32,13 @@ impl Operation for AddServiceAccount {
|
||||
};
|
||||
let _is_owner = true; // 先按true处理,后期根据请求决定。
|
||||
|
||||
let Some(body) = req.input.bytes() else {
|
||||
return Err(s3_error!(InvalidRequest, "get body failed"));
|
||||
let mut input = req.input;
|
||||
let body = match input.store_all_unlimited().await {
|
||||
Ok(b) => b,
|
||||
Err(e) => {
|
||||
warn!("get body failed, e: {:?}", e);
|
||||
return Err(s3_error!(InvalidRequest, "get body failed"));
|
||||
}
|
||||
};
|
||||
|
||||
let mut create_req: AddServiceAccountReq =
|
||||
|
||||
@@ -53,10 +53,6 @@ impl Operation for AddUser {
|
||||
}
|
||||
};
|
||||
|
||||
// let Some(body) = req.input.bytes() else {
|
||||
// return Err(s3_error!(InvalidRequest, "get body failed"));
|
||||
// };
|
||||
|
||||
// let body_bytes = decrypt_data(input_cred.secret_key.expose().as_bytes(), &body)
|
||||
// .map_err(|e| S3Error::with_message(S3ErrorCode::InvalidArgument, format!("decrypt_data err {}", e)))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user