mirror of
https://github.com/minio/minio
synced 2024-11-05 17:34:01 +00: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
1 changed files with 5 additions and 0 deletions
|
@ -420,6 +420,11 @@ func (api objectAPIHandlers) getObjectHandler(ctx context.Context, objectAPI Obj
|
||||||
|
|
||||||
gr, err := getObjectNInfo(ctx, bucket, object, rs, r.Header, readLock, opts)
|
gr, err := getObjectNInfo(ctx, bucket, object, rs, r.Header, readLock, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if isErrPreconditionFailed(err) {
|
||||||
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reader *GetObjectReader
|
reader *GetObjectReader
|
||||||
proxy proxyResult
|
proxy proxyResult
|
||||||
|
|
Loading…
Reference in a new issue