aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-03-20 10:52:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-03-20 10:52:24 +0000
commitca9760756ae2d02b95f2ce7158a24df79d62ea85 (patch)
tree39469890064eedd684a69369f45bb6054039f13a /lib
parentf1f993a25b5f8fe403b92d4e0bfb9ecd7796fa91 (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.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 809ca7a7e..efef6adde 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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;
}