From: Daniel Stenberg Date: Mon, 16 May 2022 08:04:05 +0000 (+0200) Subject: tool_operate: make sure --fail-with-body works with --retry X-Git-Tag: curl-7_84_0~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0356804d13676641aec9b004722c23ae8b424c49;p=thirdparty%2Fcurl.git 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 --- 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