mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
when no FTP transfer was done, don't attempt to read the download transfer
thing. The 'resumed' flag is also causing confusions. I'll deal with that tomorrow.
This commit is contained in:
parent
407583e8e2
commit
cae555c977
23
lib/ftp.c
23
lib/ftp.c
@ -656,18 +656,19 @@ 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) {
|
||||
/* 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) {
|
||||
|
||||
/* 226 Transfer complete, 250 Requested file action okay, completed. */
|
||||
if((ftpcode != 226) && (ftpcode != 250)) {
|
||||
failf(data, "server did not report OK, got %d", ftpcode);
|
||||
return CURLE_FTP_WRITE_ERROR;
|
||||
if(!conn->bits.resume_done) {
|
||||
/* 226 Transfer complete, 250 Requested file action okay, completed. */
|
||||
if((ftpcode != 226) && (ftpcode != 250)) {
|
||||
failf(data, "server did not report OK, got %d", ftpcode);
|
||||
return CURLE_FTP_WRITE_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user