]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: make sure --fail-with-body works with --retry
authorDaniel Stenberg <daniel@haxx.se>
Mon, 16 May 2022 08:04:05 +0000 (10:04 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 16 May 2022 08:04:06 +0000 (10:04 +0200)
... in the same way --fail already does.

Reported-by: Jakub Bochenski
Fixes #8845
Closes #8847

src/tool_operate.c

index daaf0bcd49d7305a5299ed3bff54b21669cb0bbb..67de59c0a75c0e28385400bb9373b9a03e946cb3 100644 (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