mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
support ETag value to be '*' (#19682)
This supports '*' as per behavior to comply with AWS S3 behavior for - 'If-Match: *' - 'If-None-Match: *'
This commit is contained in:
parent
847ee5ac45
commit
888d2bb1d8
@ -23,6 +23,7 @@ import (
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/internal/amztime"
|
||||
@ -325,6 +326,9 @@ func canonicalizeETag(etag string) string {
|
||||
// isETagEqual return true if the canonical representations of two ETag strings
|
||||
// are equal, false otherwise
|
||||
func isETagEqual(left, right string) bool {
|
||||
if strings.TrimSpace(right) == "*" {
|
||||
return true
|
||||
}
|
||||
return canonicalizeETag(left) == canonicalizeETag(right)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user