fix: apply pre-conditions first on object metadata (#12545)

This change in error flow complies with AWS S3 behavior
for applications depending on specific error conditions.

fixes #12543
This commit is contained in:
Harshavardhana
2021-06-24 09:44:00 -07:00
committed by GitHub
parent 9bf1ac0bb6
commit 41caf89cf4
9 changed files with 74 additions and 133 deletions

View File

@@ -1122,7 +1122,7 @@ func proxyGetToReplicationTarget(ctx context.Context, bucket, object string, rs
}
closeReader := func() { obj.Close() }
reader, err := fn(obj, h, opts.CheckPrecondFn, closeReader)
reader, err := fn(obj, h, closeReader)
if err != nil {
return nil, false
}