mirror of
https://github.com/minio/minio.git
synced 2026-02-09 12:20:15 -05:00
Add decommission compression+encryption enabled tests (#15322)
update compression environment variables to follow the expected sub-system style, however support fallback mode.
This commit is contained in:
@@ -440,10 +440,7 @@ func isCompressible(header http.Header, object string) bool {
|
||||
cfg := globalCompressConfig
|
||||
globalCompressConfigMu.Unlock()
|
||||
|
||||
if !cfg.Enabled || (crypto.Requested(header) && !cfg.AllowEncrypted) || excludeForCompression(header, object, cfg) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return !excludeForCompression(header, object, cfg)
|
||||
}
|
||||
|
||||
// Eliminate the non-compressible objects.
|
||||
@@ -454,6 +451,10 @@ func excludeForCompression(header http.Header, object string, cfg compress.Confi
|
||||
return true
|
||||
}
|
||||
|
||||
if crypto.Requested(header) && !cfg.AllowEncrypted {
|
||||
return true
|
||||
}
|
||||
|
||||
// We strictly disable compression for standard extensions/content-types (`compressed`).
|
||||
if hasStringSuffixInSlice(objStr, standardExcludeCompressExtensions) || hasPattern(standardExcludeCompressContentTypes, contentType) {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user