aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES8
-rw-r--r--RELEASE-NOTES3
-rw-r--r--docs/curl.12
-rw-r--r--src/main.c8
-rw-r--r--tests/data/test1962
5 files changed, 16 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index a697ba7b7..872b17cc5 100644
--- 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
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index dc59f8884..8d4045905 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -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)
diff --git a/docs/curl.1 b/docs/curl.1
index 705b7fd42..f8101206d 100644
--- a/docs/curl.1
+++ b/docs/curl.1
@@ -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
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;
}
diff --git a/tests/data/test196 b/tests/data/test196
index 663eaf2e0..b070f38a0 100644
--- a/tests/data/test196
+++ b/tests/data/test196
@@ -2,7 +2,7 @@
# Server-side
<reply>
<servercmd>
-REPLY PASS 530 temporarily not available
+REPLY PASS 430 temporarily not available
</servercmd>
</reply>