- 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)
This commit is contained in:
Daniel Stenberg 2009-12-10 21:02:11 +00:00
parent b91ed67276
commit 296ebf382c
5 changed files with 16 additions and 7 deletions

View file

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