mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
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:
@@ -345,7 +345,7 @@ func (l *s3EncObjects) GetObjectNInfo(ctx context.Context, bucket, object string
|
||||
// Setup cleanup function to cause the above go-routine to
|
||||
// exit in case of partial read
|
||||
pipeCloser := func() { pr.Close() }
|
||||
return fn(pr, h, o.CheckPrecondFn, pipeCloser)
|
||||
return fn(pr, h, pipeCloser)
|
||||
}
|
||||
|
||||
// GetObjectInfo reads object info and replies back ObjectInfo
|
||||
|
||||
@@ -404,7 +404,7 @@ func (l *s3Objects) GetObjectNInfo(ctx context.Context, bucket, object string, r
|
||||
// Setup cleanup function to cause the above go-routine to
|
||||
// exit in case of partial read
|
||||
pipeCloser := func() { pr.Close() }
|
||||
return fn(pr, h, opts.CheckPrecondFn, pipeCloser)
|
||||
return fn(pr, h, pipeCloser)
|
||||
}
|
||||
|
||||
// GetObject reads an object from S3. Supports additional
|
||||
|
||||
Reference in New Issue
Block a user