mirror of
https://github.com/minio/minio.git
synced 2026-11-25 23:23:49 +00:00
support if-match/if-none-match with s3 uploads (#16551)
This commit is contained in:
1 parent
422c396d73
commit
11c7ecb5cf
2 files changed
+28
-2
No files matched your search
@@ -1769,7 +1769,9 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
|
||||
}
|
||||
opts.IndexCB = idxCb
|
||||
|
||||
if !opts.MTime.IsZero() && opts.PreserveETag != "" {
|
||||
if (!opts.MTime.IsZero() && opts.PreserveETag != "") ||
|
||||
r.Header.Get(xhttp.IfMatch) != "" ||
|
||||
r.Header.Get(xhttp.IfNoneMatch) != "" {
|
||||
opts.CheckPrecondFn = func(oi ObjectInfo) bool {
|
||||
if _, err := DecryptObjectInfo(&oi, r); err != nil {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
|
||||
Reference in new issue
Block a user