aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-06-11 12:35:03 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-06-11 12:35:03 +0000
commit4fe252847cfce391ccd83df097ff6c5dddc34754 (patch)
tree8b9477d3d6a0c42d1429f1176a62c3e041498f9c /lib/ftp.c
parent109cbbe9c5cd349d692d127d816192b88d5c9890 (diff)
ftp range downloads make us ignore the final status message as the server
will most likely treat the download as failed as we might abort it pre-maturely
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 388bba399..b9bf38f34 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -656,12 +656,13 @@ CURLcode Curl_ftp_done(struct connectdata *conn)
sclose(conn->secondarysocket);
conn->secondarysocket = -1;
+ /* now let's see what the server says about the transfer we
+ just performed: */
+ nread = Curl_GetFTPResponse(buf, conn, &ftpcode);
+ if(nread < 0)
+ return CURLE_OPERATION_TIMEOUTED;
+
if(!data->set.no_body && !conn->bits.resume_done) {
- /* now let's see what the server says about the transfer we
- just performed: */
- nread = Curl_GetFTPResponse(buf, conn, &ftpcode);
- if(nread < 0)
- return CURLE_OPERATION_TIMEOUTED;
/* 226 Transfer complete, 250 Requested file action okay, completed. */
if((ftpcode != 226) && (ftpcode != 250)) {
@@ -1787,6 +1788,7 @@ CURLcode ftp_perform(struct connectdata *conn)
}
infof(data, "range-download from %d to %d, totally %d bytes\n",
from, to, totalsize);
+ conn->bits.resume_done = TRUE; /* to prevent some error due to this */
}
if((data->set.ftp_list_only) || !ftp->file) {