From 79156d2d828f52cf714bd76b58b1a64ef679874d Mon Sep 17 00:00:00 2001 From: likewu Date: Fri, 4 Jul 2025 21:57:51 +0800 Subject: [PATCH] fix --- crates/ecstore/src/client/bucket_cache.rs | 2 -- crates/ecstore/src/client/transition_api.rs | 5 ++--- crates/signer/src/request_signature_v2.rs | 6 ++++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/ecstore/src/client/bucket_cache.rs b/crates/ecstore/src/client/bucket_cache.rs index 93f9a691d..4e6f50746 100644 --- a/crates/ecstore/src/client/bucket_cache.rs +++ b/crates/ecstore/src/client/bucket_cache.rs @@ -1,4 +1,3 @@ -#![allow(clippy::map_entry)] // Copyright 2024 RustFS Team // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,7 +30,6 @@ use crate::client::{ transition_api::{Document, TransitionClient}, }; use rustfs_utils::hash::EMPTY_STRING_SHA256_HASH; -use rustfs_utils::hasher::{Hasher, Sha256}; use s3s::Body; use s3s::S3ErrorCode; diff --git a/crates/ecstore/src/client/transition_api.rs b/crates/ecstore/src/client/transition_api.rs index 38028c6a7..512ec9954 100644 --- a/crates/ecstore/src/client/transition_api.rs +++ b/crates/ecstore/src/client/transition_api.rs @@ -1,4 +1,3 @@ -#![allow(clippy::map_entry)] // Copyright 2024 RustFS Team // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -102,8 +101,8 @@ pub struct TransitionClient { pub region: String, pub random: u64, pub lookup: BucketLookupType, - pub md5_hasher: Arc>>, - pub sha256_hasher: Option, + pub md5_hasher: Arc>>, + pub sha256_hasher: Option, pub health_status: AtomicI32, pub trailing_header_support: bool, pub max_retries: i64, diff --git a/crates/signer/src/request_signature_v2.rs b/crates/signer/src/request_signature_v2.rs index f3d3c160a..ded0c92c6 100644 --- a/crates/signer/src/request_signature_v2.rs +++ b/crates/signer/src/request_signature_v2.rs @@ -28,7 +28,7 @@ const SIGN_V2_ALGORITHM: &str = "AWS"; fn encode_url2path(req: &request::Request, _virtual_host: bool) -> String { - req.uri_ref().unwrap().path().to_string() + req.uri().path().to_string() } pub fn pre_sign_v2( @@ -73,7 +73,9 @@ pub fn pre_sign_v2( .unwrap(), ); - req.uri(Uri::from_parts(parts).unwrap()) + *req.uri_mut() = Uri::from_parts(parts).unwrap(); + + req } fn _post_pre_sign_signature_v2(policy_base64: &str, secret_access_key: &str) -> String {