fix(s3): complete CopyObject checksum support (#5178)

This commit is contained in:
cxymds
2026-07-24 16:57:11 +08:00
committed by GitHub
parent 3132637294
commit 9eaf5fc8e3
8 changed files with 495 additions and 63 deletions
+2 -4
View File
@@ -180,10 +180,8 @@ impl ChecksumType {
(self.0 & Self::FULL_OBJECT.0) == Self::FULL_OBJECT.0 || self.is(Self::CRC64_NVME)
}
/// True for the five algorithms s3s exposes as typed `*Output` fields
/// (CRC32/CRC32C/SHA1/SHA256/CRC64NVME). The AWS 2026-04 additional algorithms
/// (XXHash3/64/128, SHA-512, MD5) have no typed field and are carried as raw
/// response headers instead. Single source of truth for that split.
/// True for the five legacy algorithms currently handled by RustFS's named
/// response fields. Additional algorithms use the extended response path.
pub fn is_s3s_typed(self) -> bool {
matches!(self.base(), Self::CRC32 | Self::CRC32C | Self::SHA1 | Self::SHA256 | Self::CRC64_NVME)
}