Merge pull request #126 from pgsty/fix/issue-118-no-compressed-ssec

fix: exclude SSE-C objects from compression
This commit is contained in:
Feng Ruohang
2026-09-06 09:26:12 +08:00
committed by GitHub
6 changed files with 825 additions and 17 deletions
+4 -1
View File
@@ -611,7 +611,10 @@ func excludeForCompression(header http.Header, object string, cfg compress.Confi
return true
}
if crypto.Requested(header) && !cfg.AllowEncrypted {
// SSE-C replication sends raw ciphertext without compression metadata.
// Exclude new SSE-C data from compression; other modes follow allow_encryption.
if crypto.SSEC.IsRequested(header) ||
(crypto.Requested(header) && !cfg.AllowEncrypted) {
return true
}