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
This commit is contained in:
Daniel Stenberg 2022-05-16 10:04:05 +02:00
parent 5980068c87
commit 0356804d13
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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