]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
- Siegfried Gyuricsko found out that the curl manual said --retry would retry
authorDaniel Stenberg <daniel@haxx.se>
Thu, 10 Dec 2009 21:02:11 +0000 (21:02 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 10 Dec 2009 21:02:11 +0000 (21:02 +0000)
  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)

CHANGES
RELEASE-NOTES
docs/curl.1
src/main.c
tests/data/test196

diff --git a/CHANGES b/CHANGES
index a697ba7b7691969699f5fef5e01b01253ce14806..872b17cc5ee4661e4a6e5f7bda9e7189b523e693 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,14 @@
                                   Changelog
 
 Daniel Stenberg (10 Dec 2009)
+- 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)
+
 - Constantine Sapuntzakis figured out a case which would lead to libcurl
   accessing alredy freed memory and thus crash when using HTTPS (with
   OpenSSL), multi interface and the CURLOPT_DEBUGFUNCTION and a certain order
index dc59f8884c7b558d74173b036ff5cb3437843faf..8d4045905913fd65ab66e89ce7d4cd844891a21f 100644 (file)
@@ -31,6 +31,7 @@ This release includes the following bugfixes:
  o TFTP BLKSIZE
  o Expect: 100-continue handling when set by the application
  o multi interface with OpenSSL read already freed memory when closing down
+ o --retry didn't do right for FTP transient errors
 
 This release includes the following known bugs:
 
@@ -42,6 +43,6 @@ advice from friends like these:
  Yang Tse, Kamil Dudka, Christian Schmitz, Constantine Sapuntzakis,
  Marco Maggi, Camille Moncelier, Claes Jakobsson, Kevin Baughman,
  Marc Kleine-Budde, Jad Chamcham, Bjorn Augustsson, David Byron,
- Markus Koetter, Chad Monroe, Martin Storsjo
+ Markus Koetter, Chad Monroe, Martin Storsjo, Siegfried Gyuricsko
 
         Thanks! (and sorry if I forgot to mention someone)
index 705b7fd42e40bf57a64efdf81e600438a85c00b1..f8101206df4659bf9541930f3e77aed4480bd593 100644 (file)
@@ -1079,7 +1079,7 @@ timestamp.
 If a transient error is returned when curl tries to perform a transfer, it
 will retry this number of times before giving up. Setting the number to 0
 makes curl do no retries (which is the default). Transient error means either:
-a timeout, an FTP 5xx response code or an HTTP 5xx response code.
+a timeout, an FTP 4xx response code or an HTTP 5xx response code.
 
 When curl is about to retry a transfer, it will first wait one second and then
 for all forthcoming retries it will double the waiting time until it reaches
index 261bb880a07593971ae2985310f621b498488773..47e25fb7e64eaa0e871fc1d32e86c7aa0d2a3bec 100644 (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;
             }
index 663eaf2e09798f9c1f184291c333f07a746b406b..b070f38a0984d4d12885ae94690fdc54961330c6 100644 (file)
@@ -2,7 +2,7 @@
 # Server-side
 <reply>
 <servercmd>
-REPLY PASS 530 temporarily not available
+REPLY PASS 430 temporarily not available
 </servercmd>
 </reply>