From 055206c4eef4396334b2a81285c4a1de3ba4d4f0 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 9 Jun 2023 18:03:05 +0100 Subject: [PATCH] yandex: fix 400 Bad Request on transfer failure Before this fix, if the upload failed for some reason the yandex backend would attempt to retry itself it which would fail immediately with 400 Bad Request. Normally we retry uploads at a higher level so they can be done with new data and this patch does that. See #7044 --- backend/yandex/yandex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/yandex/yandex.go b/backend/yandex/yandex.go index a643a7771..806c5f915 100644 --- a/backend/yandex/yandex.go +++ b/backend/yandex/yandex.go @@ -1100,7 +1100,7 @@ func (o *Object) upload(ctx context.Context, in io.Reader, overwrite bool, mimeT NoResponse: true, } - err = o.fs.pacer.Call(func() (bool, error) { + err = o.fs.pacer.CallNoRetry(func() (bool, error) { resp, err = o.fs.srv.Call(ctx, &opts) return shouldRetry(ctx, resp, err) })