diff -rcN curl-7.19.7/lib/ftp.c curl-7.19.7-updated/lib/ftp.c
*** curl-7.19.7/lib/ftp.c	2009-09-20 07:52:15.000000000 -0400
--- curl-7.19.7-updated/lib/ftp.c	2010-01-18 15:02:19.000000000 -0500
***************
*** 2398,2403 ****
--- 2398,2405 ----
  
      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 -rcN curl-7.19.7/tests/data/test129 curl-7.19.7-updated/tests/data/test129
*** curl-7.19.7/tests/data/test129	1969-12-31 19:00:00.000000000 -0500
--- curl-7.19.7-updated/tests/data/test129	2010-01-18 15:02:46.000000000 -0500
***************
*** 0 ****
--- 1,52 ----
+ <testcase>
+ <info>
+ <keywords>
+ FTP
+ EPSV
+ TYPE A
+ RETR
+ type=
+ </keywords>
+ </info>
+ # Server-side
+ <reply>
+ <size>
+ 37
+ </size>
+ <data>
+ data
+     to
+       see
+ that FTP
+ works
+   so does it?
+ </data>
+ </reply>
+ 
+ # Client-side
+ <client>
+ <server>
+ ftp
+ </server>
+  <name>
+ FTP GET with type=A style ASCII URL and understated server SIZE
+  </name>
+  <command>
+ "ftp://%HOSTIP:%FTPPORT/129;type=A"
+ </command>
+ </client>
+ 
+ # Verify data after the test has been "shot"
+ <verify>
+ <protocol>
+ USER anonymous
+ PASS ftp@example.com
+ PWD
+ EPSV
+ TYPE A
+ SIZE 129
+ RETR 129
+ QUIT
+ </protocol>
+ </verify>
+ </testcase>
