mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
replication: Avoid proxying when precondition failed (#15134)
Proxying is not required when content is on this cluster and does not meet pre-conditions specified in the request. Fixes #15124
This commit is contained in:
parent
f293df647c
commit
1cfb03fb74
@ -420,6 +420,11 @@ func (api objectAPIHandlers) getObjectHandler(ctx context.Context, objectAPI Obj
|
||||
|
||||
gr, err := getObjectNInfo(ctx, bucket, object, rs, r.Header, readLock, opts)
|
||||
if err != nil {
|
||||
if isErrPreconditionFailed(err) {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
reader *GetObjectReader
|
||||
proxy proxyResult
|
||||
|
Loading…
Reference in New Issue
Block a user