mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fix: return error on conditional write for non existing object (#21550)
This commit is contained in:
@@ -414,12 +414,16 @@ func putOptsFromHeaders(ctx context.Context, hdr http.Header, metadata map[strin
|
||||
if err != nil {
|
||||
return ObjectOptions{}, err
|
||||
}
|
||||
return ObjectOptions{
|
||||
op := ObjectOptions{
|
||||
ServerSideEncryption: sseKms,
|
||||
UserDefined: metadata,
|
||||
MTime: mtime,
|
||||
PreserveETag: etag,
|
||||
}, nil
|
||||
}
|
||||
if _, ok := hdr[xhttp.MinIOSourceReplicationRequest]; ok {
|
||||
op.ReplicationRequest = true
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
// default case of passing encryption headers and UserDefined metadata to backend
|
||||
opts, err = getDefaultOpts(hdr, false, metadata)
|
||||
|
||||
Reference in New Issue
Block a user