remove mTime requirement from pre-condition checks (#17916)

given a versionId the mtime is always the same, it
can never be different than its original value.

versionIds also do not conflict, since they are uuid's
and unique practically forever.
This commit is contained in:
Harshavardhana
2023-08-24 14:33:58 -07:00
committed by GitHub
parent 02cc18ff29
commit 62c9e500de
3 changed files with 5 additions and 4 deletions

View File

@@ -1780,7 +1780,7 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
}
opts.IndexCB = idxCb
if (!opts.MTime.IsZero() && opts.PreserveETag != "") ||
if opts.PreserveETag != "" ||
r.Header.Get(xhttp.IfMatch) != "" ||
r.Header.Get(xhttp.IfNoneMatch) != "" {
opts.CheckPrecondFn = func(oi ObjectInfo) bool {