mirror of
https://github.com/minio/minio.git
synced 2025-01-26 06:03:17 -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"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/minio/minio/internal/amztime"
|
"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
|
// isETagEqual return true if the canonical representations of two ETag strings
|
||||||
// are equal, false otherwise
|
// are equal, false otherwise
|
||||||
func isETagEqual(left, right string) bool {
|
func isETagEqual(left, right string) bool {
|
||||||
|
if strings.TrimSpace(right) == "*" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return canonicalizeETag(left) == canonicalizeETag(right)
|
return canonicalizeETag(left) == canonicalizeETag(right)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user