mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
fix
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
#![allow(clippy::map_entry)]
|
|
||||||
// Copyright 2024 RustFS Team
|
// Copyright 2024 RustFS Team
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -31,7 +30,6 @@ use crate::client::{
|
|||||||
transition_api::{Document, TransitionClient},
|
transition_api::{Document, TransitionClient},
|
||||||
};
|
};
|
||||||
use rustfs_utils::hash::EMPTY_STRING_SHA256_HASH;
|
use rustfs_utils::hash::EMPTY_STRING_SHA256_HASH;
|
||||||
use rustfs_utils::hasher::{Hasher, Sha256};
|
|
||||||
use s3s::Body;
|
use s3s::Body;
|
||||||
use s3s::S3ErrorCode;
|
use s3s::S3ErrorCode;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#![allow(clippy::map_entry)]
|
|
||||||
// Copyright 2024 RustFS Team
|
// Copyright 2024 RustFS Team
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -102,8 +101,8 @@ pub struct TransitionClient {
|
|||||||
pub region: String,
|
pub region: String,
|
||||||
pub random: u64,
|
pub random: u64,
|
||||||
pub lookup: BucketLookupType,
|
pub lookup: BucketLookupType,
|
||||||
pub md5_hasher: Arc<Mutex<Option<MD5>>>,
|
pub md5_hasher: Arc<Mutex<Option<HashAlgorithm>>>,
|
||||||
pub sha256_hasher: Option<Sha256>,
|
pub sha256_hasher: Option<HashAlgorithm>,
|
||||||
pub health_status: AtomicI32,
|
pub health_status: AtomicI32,
|
||||||
pub trailing_header_support: bool,
|
pub trailing_header_support: bool,
|
||||||
pub max_retries: i64,
|
pub max_retries: i64,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const SIGN_V2_ALGORITHM: &str = "AWS";
|
|||||||
|
|
||||||
fn encode_url2path(req: &request::Request<Body>, _virtual_host: bool) -> String {
|
fn encode_url2path(req: &request::Request<Body>, _virtual_host: bool) -> String {
|
||||||
|
|
||||||
req.uri_ref().unwrap().path().to_string()
|
req.uri().path().to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pre_sign_v2(
|
pub fn pre_sign_v2(
|
||||||
@@ -73,7 +73,9 @@ pub fn pre_sign_v2(
|
|||||||
.unwrap(),
|
.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 {
|
fn _post_pre_sign_signature_v2(policy_base64: &str, secret_access_key: &str) -> String {
|
||||||
|
|||||||
Reference in New Issue
Block a user