diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-03-20 10:52:24 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-03-20 10:52:24 +0000 |
commit | ca9760756ae2d02b95f2ce7158a24df79d62ea85 (patch) | |
tree | 39469890064eedd684a69369f45bb6054039f13a | |
parent | f1f993a25b5f8fe403b92d4e0bfb9ecd7796fa91 (diff) |
verbose FTP PASV output could output a "random" name from the stack based
array
Also, uploading data with --crlf cannot check that the proper size was
uploaded and thus should not warn if the sizes differ. This can be changed
in the future by having the expected size in the connectdata struct and then
increase the expected size for each byte that is added in the --crlf
replacement process.
-rw-r--r-- | lib/ftp.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -622,8 +622,10 @@ CURLcode Curl_ftp_done(struct connectdata *conn) CURLcode result=CURLE_OK; if(data->set.upload) { - if((-1 != data->set.infilesize) && (data->set.infilesize != *ftp->bytecountp)) { - failf(data, "Wrote only partial file (%d out of %d bytes)", + if((-1 != data->set.infilesize) && + (data->set.infilesize != *ftp->bytecountp) && + !data->set.crlf) { + failf(data, "Uploaded unaligned file size (%d out of %d bytes)", *ftp->bytecountp, data->set.infilesize); return CURLE_PARTIAL_FILE; } @@ -1460,7 +1462,7 @@ CURLcode ftp_use_pasv(struct connectdata *conn) /* normal, direct, ftp connection */ addr = Curl_resolv(data, newhostp, newport, &hostdataptr); if(!addr) { - failf(data, "Can't resolve new host %s", newhost); + failf(data, "Can't resolve new host %s:%d", newhostp, newport); return CURLE_FTP_CANT_GET_HOST; } connectport = newport; /* we connect to the remote port */ @@ -1475,7 +1477,7 @@ CURLcode ftp_use_pasv(struct connectdata *conn) if((CURLE_OK == result) && data->set.verbose) /* this just dumps information about this second connection */ - ftp_pasv_verbose(conn, conninfo, newhost, connectport); + ftp_pasv_verbose(conn, conninfo, newhostp, connectport); if(CURLE_OK != result) return result; @@ -1483,7 +1485,7 @@ CURLcode ftp_use_pasv(struct connectdata *conn) if (data->set.tunnel_thru_httpproxy) { /* We want "seamless" FTP operations through HTTP proxy tunnel */ result = Curl_ConnectHTTPProxyTunnel(conn, conn->secondarysocket, - newhost, newport); + newhostp, newport); if(CURLE_OK != result) return result; } |