From 0356804d13676641aec9b004722c23ae8b424c49 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 May 2022 10:04:05 +0200 Subject: [PATCH] tool_operate: make sure --fail-with-body works with --retry ... in the same way --fail already does. Reported-by: Jakub Bochenski Fixes #8845 Closes #8847 --- src/tool_operate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_operate.c b/src/tool_operate.c index daaf0bcd49..67de59c0a7 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -435,7 +435,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, retry = RETRY_CONNREFUSED; } else if((CURLE_OK == result) || - (config->failonerror && + ((config->failonerror || config->failwithbody) && (CURLE_HTTP_RETURNED_ERROR == result))) { /* If it returned OK. _or_ failonerror was enabled and it returned due to such an error, check for HTTP transient