From 296ebf382c7f629f3ab8a8ca895153d72202629d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 10 Dec 2009 21:02:11 +0000 Subject: - 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) --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main.c') 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; } -- cgit v1.2.3