fix: checksum CopyObject data before compression

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-08-24 19:51:27 +08:00
parent 56c67dacf1
commit c0e7159771
4 changed files with 549 additions and 15 deletions
+4 -4
View File
@@ -1134,11 +1134,11 @@ func (p *PutObjReader) contentChecksum() map[string]string {
}
// RawServerSideChecksumResult returns the ServerSideChecksumResult from the
// underlying rawReader, since the PutObjReader might be encrypted data and
// thus any checksum from that would be incorrect.
// logical plaintext checksum reader, since the PutObjReader might contain
// compressed or encrypted data and thus any checksum from that would be incorrect.
func (p *PutObjReader) RawServerSideChecksumResult() *hash.Checksum {
if p.rawReader != nil {
return p.rawReader.ServerSideChecksumResult
if p.checksumReader != nil {
return p.checksumReader.ServerSideChecksumResult
}
return nil
}