mirror of
https://github.com/minio/minio.git
synced 2025-07-29 02:00:59 -04:00
fix boundary value bug when objTime ends in whole seconds (without sub-second) (#21419)
This commit is contained in:
parent
64f5c6103f
commit
50fcf9b670
@ -331,7 +331,7 @@ func checkPreconditions(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
||||
func ifModifiedSince(objTime time.Time, givenTime time.Time) bool {
|
||||
// The Date-Modified header truncates sub-second precision, so
|
||||
// use mtime < t+1s instead of mtime <= t to check for unmodified.
|
||||
return objTime.After(givenTime.Add(1 * time.Second))
|
||||
return !objTime.Before(givenTime.Add(1 * time.Second))
|
||||
}
|
||||
|
||||
// canonicalizeETag returns ETag with leading and trailing double-quotes removed,
|
||||
|
Loading…
x
Reference in New Issue
Block a user