Skip to content

Commit

Permalink
support ETag value to be '*' (minio#19682)
Browse files Browse the repository at this point in the history
This supports '*' as per behavior to
comply with AWS S3 behavior for

- 'If-Match: *'
- 'If-None-Match: *'
  • Loading branch information
harshavardhana authored May 7, 2024
1 parent 847ee5a commit 888d2bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/object-handlers-common.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"net/http"
"regexp"
"strconv"
"strings"
"time"

"github.com/minio/minio/internal/amztime"
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 888d2bb

Please sign in to comment.