fix(ecstore): read provider tier version headers (#5041)

Refs rustfs/backlog#1358

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-07-20 10:46:29 +08:00
committed by GitHub
parent 4f0be83ea5
commit 67c4e3e60e
8 changed files with 316 additions and 39 deletions
@@ -44,7 +44,7 @@ use crate::client::{
use crate::client::utils::base64_encode;
use rustfs_utils::path::trim_etag;
use s3s::header::{X_AMZ_EXPIRATION, X_AMZ_VERSION_ID};
use s3s::header::X_AMZ_EXPIRATION;
/// Read exactly `want` bytes for a single multipart part, or fewer if the reader
/// reaches EOF first. Advances the reader so the next call returns the following
@@ -567,11 +567,7 @@ impl TransitionClient {
key: object_name.to_string(),
etag: trim_etag(h.get("ETag").and_then(|v| v.to_str().ok()).unwrap_or("")),
version_id: if let Some(h_x_amz_version_id) = h.get(X_AMZ_VERSION_ID) {
h_x_amz_version_id.to_str().unwrap_or("").to_string()
} else {
"".to_string()
},
version_id: self.raw_version_id(h)?.unwrap_or_default().to_string(),
size,
expiration: exp_time,
expiration_rule_id: rule_id,