summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-12-10 21:02:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-12-10 21:02:11 +0000
commit296ebf382c7f629f3ab8a8ca895153d72202629d (patch)
tree0f5ad95f1a985a8c7fda1ba70c13deab7455cab3 /src
parentb91ed67276bb02bdd7bd8fdfead5d299e0164d84 (diff)
downloadcurl-296ebf382c7f629f3ab8a8ca895153d72202629d.tar.gz
- Siegfried Gyuricsko found out that the curl manual said --retry would retry
on FTP errors in the transient 5xx range. Transient FTP errors are in the 4xx range. The code itself only tried on 5xx errors that occured _at login_. Now the retry code retries on all FTP transfer failures that ended with a 4xx response. (http://curl.haxx.se/bug/view.cgi?id=2911279)
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 261bb880a..47e25fb7e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -5066,14 +5066,14 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
}
}
} /* if CURLE_OK */
- else if(CURLE_LOGIN_DENIED == res) {
+ else if(res) {
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
- if(response/100 == 5)
+ if(response/100 == 4)
/*
* This is typically when the FTP server only allows a certain
- * amount of users and we are not one of them. It mostly
- * returns 530 in this case, but all 5xx codes are transient.
+ * amount of users and we are not one of them. All 4xx codes
+ * are transient.
*/
retry = RETRY_FTP;
}