fix: use equalFold() instead of lower and compare (#13624)

This commit is contained in:
Harshavardhana
2021-11-10 08:12:50 -08:00
committed by GitHub
parent 03725dc015
commit ea820b30bf
9 changed files with 10 additions and 9 deletions

View File

@@ -382,7 +382,7 @@ func IsObjectLockLegalHoldRequested(h http.Header) bool {
// IsObjectLockGovernanceBypassSet returns true if object lock governance bypass header is set.
func IsObjectLockGovernanceBypassSet(h http.Header) bool {
return strings.ToLower(h.Get(AmzObjectLockBypassRetGovernance)) == "true"
return strings.EqualFold(h.Get(AmzObjectLockBypassRetGovernance), "true")
}
// IsObjectLockRequested returns true if legal hold or object lock retention headers are requested.