diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 5ab136497..573b9e9c3 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -1563,6 +1563,9 @@ func replicateObjectWithMultipart(ctx context.Context, c *minio.Core, bucket, ob if err == nil { break } + if minio.ToErrorResponse(err).Code == "PreconditionFailed" { + return err + } attempts++ time.Sleep(time.Duration(rand.Int63n(int64(time.Second)))) } diff --git a/cmd/object-handlers-common.go b/cmd/object-handlers-common.go index 8ff232f7e..e84fd26ca 100644 --- a/cmd/object-handlers-common.go +++ b/cmd/object-handlers-common.go @@ -138,7 +138,7 @@ func checkCopyObjectPreconditions(ctx context.Context, w http.ResponseWriter, r // x-minio-source-etag func checkPreconditionsPUT(ctx context.Context, w http.ResponseWriter, r *http.Request, objInfo ObjectInfo, opts ObjectOptions) bool { // Return false for methods other than PUT. - if r.Method != http.MethodPut { + if r.Method != http.MethodPut && r.Method != http.MethodPost { return false } // If the object doesn't have a modtime (IsZero), or the modtime