diff --git a/CHANGES b/CHANGES index 43752e72c..79ab4f630 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,13 @@ Changelog +Daniel Stenberg (19 Jan 2010) +- David McCreedy brought a fix and a new test case (129) to make libcurl work + again when downloading files over FTP using ASCII and it turns out that the + final size of the file is not the same as the initial size the server + reported. This is very common since servers don't take the newline + conversions into account. + Kamil Dudka (14 Jan 2010) - Suppressed side effect of OpenSSL configure checks, which prevented NSS from being properly detected under certain circumstances. It had been caused by diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fc236e7ae..37b314c1e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -45,6 +45,7 @@ This release includes the following bugfixes: o OpenSSL session id ref count leak o progress callback called repeatedly during slow connects o curl_multi_fdset() would return -1 too often during SCP/SFTP transfers + o FTP file size checks with ASCII transfers This release includes the following known bugs: @@ -58,6 +59,6 @@ advice from friends like these: Marc Kleine-Budde, Jad Chamcham, Bjorn Augustsson, David Byron, Markus Koetter, Chad Monroe, Martin Storsjo, Siegfried Gyuricsko, Jon Nelson, Julien Chaffraix, Renato Botelho, Peter Pentchev, Ingmar Runge, - Johan van Selst, Charles Kerr, Gil Weber + Johan van Selst, Charles Kerr, Gil Weber, David McCreedy Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/ftp.c b/lib/ftp.c index 497759f10..0984ca961 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2204,6 +2204,8 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, if(size > data->req.maxdownload && data->req.maxdownload > 0) size = data->req.size = data->req.maxdownload; + else if((instate != FTP_LIST) && (data->set.prefer_ascii)) + size = -1; /* kludge for servers that understate ASCII mode file size */ infof(data, "Maxdownload = %" FORMAT_OFF_T "\n", data->req.maxdownload); diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 18da49a15..993c40ca4 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -64,7 +64,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test1097 test560 test561 test1098 test1099 test562 test563 test1100 \ test564 test1101 test1102 test1103 test1104 test299 test310 test311 \ test312 test1105 test565 test800 test1106 test801 test566 test802 test803 \ - test1107 test1108 test1109 test1110 test1111 test1112 + test1107 test1108 test1109 test1110 test1111 test1112 test129 filecheck: @mkdir test-place; \