David McCreedy brought line end conversions when doing FTP ASCII

transfers. They are done on non-windows systems and translate CRLF to LF.
This commit is contained in:
Daniel Stenberg
2006-04-26 07:40:37 +00:00
parent 8ed6762363
commit 95152aec68
23 changed files with 380 additions and 214 deletions

View File

@@ -2994,6 +2994,13 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status)
}
else {
if((-1 != conn->size) && (conn->size != *ftp->bytecountp) &&
#ifdef CURL_DO_LINEEND_CONV
/* Most FTP servers don't adjust their file SIZE response for CRLFs, so
* we'll check to see if the discrepancy can be explained by the number
* of CRLFs we've changed to LFs.
*/
((conn->size + data->state.crlf_conversions) != *ftp->bytecountp) &&
#endif /* CURL_DO_LINEEND_CONV */
(conn->maxdownload != *ftp->bytecountp)) {
failf(data, "Received only partial file: %" FORMAT_OFF_T " bytes",
*ftp->bytecountp);