mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-30 17:13:40 +08:00
chore(tier): remove dead trailing_headers config from warm backends (#6762)
TransitionClient::new() in crates/s3-client/src/transition_api.rs computes trailing_header_support = opts.trailing_headers && override_signer_type == SignatureV4, but override_signer_type is hardcoded to SignatureDefault at construction and never mutated afterwards, so the expression is always false regardless of opts.trailing_headers. The resulting field also has no live reader: its only reference is inside PutObjectOptions::validate() in crates/s3-client/src/api_put_object.rs, which is itself #[allow(dead_code, reason = "MinIO-parity ... no caller in this port")], and even there the reference to trailing_header_support is commented out. So trailing_headers: true in the seven warm_backend_*.rs constructors has never had any effect on request signing or chunked/trailing-header behavior (stream_sha256 signing is gated separately by metadata.stream_sha256 && !self.secure). Remove the misleading dead configuration from the seven provider constructors so it doesn't look like intentional, load-bearing behavior to future readers. Found during adversarial self-check while implementing rustfs/backlog#2040 (out of that issue's scope).
This commit is contained in:
@@ -68,7 +68,6 @@ impl WarmBackendAliyun {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
bucket_lookup: BucketLookupType::BucketLookupDNS,
|
||||
..Default::default()
|
||||
|
||||
@@ -68,7 +68,6 @@ impl WarmBackendAzure {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
bucket_lookup: BucketLookupType::BucketLookupDNS,
|
||||
..Default::default()
|
||||
|
||||
@@ -68,7 +68,6 @@ impl WarmBackendHuaweicloud {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
bucket_lookup: BucketLookupType::BucketLookupDNS,
|
||||
..Default::default()
|
||||
|
||||
@@ -68,7 +68,6 @@ impl WarmBackendMinIO {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -68,7 +68,6 @@ impl WarmBackendR2 {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -65,7 +65,6 @@ impl WarmBackendRustFS {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -68,7 +68,6 @@ impl WarmBackendTencent {
|
||||
let opts = Options {
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
trailing_headers: true,
|
||||
region: conf.region.clone(),
|
||||
bucket_lookup: BucketLookupType::BucketLookupDNS,
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user