4. FTP
4.1 HOST
4.4 Support CURLOPT_PREQUOTE for directories listings
- 4.5 ASCII support
4.6 GSSAPI via Windows SSPI
4.7 STAT for LIST without data connection
4.8 Passive transfer could try other IP addresses
https://github.com/curl/curl/issues/8602
-4.5 ASCII support
-
- FTP ASCII transfers do not follow RFC 959. They do not convert the data
- accordingly.
-
4.6 GSSAPI via Windows SSPI
In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5)
Curl_safefree(ftpc->newhost);
}
-#ifdef CURL_DO_LINEEND_CONV
/***********************************************************************
*
* Lineend Conversions
sizeof(struct ftp_cw_lc_ctx)
};
-#endif /* CURL_DO_LINEEND_CONV */
/***********************************************************************
*
* AcceptServerConnect()
CURLcode result = CURLE_OK;
struct connectdata *conn = data->conn;
struct ftp_conn *ftpc = &conn->proto.ftpc;
+ /* FTP data may need conversion. */
+ struct Curl_cwriter *ftp_lc_writer;
*done = FALSE; /* default to false */
ftpc->wait_data_conn = FALSE; /* default to no such wait */
-#ifdef CURL_DO_LINEEND_CONV
- {
- /* FTP data may need conversion. */
- struct Curl_cwriter *ftp_lc_writer;
-
- result = Curl_cwriter_create(&ftp_lc_writer, data, &ftp_cw_lc,
- CURL_CW_CONTENT_DECODE);
- if(result)
- return result;
+ result = Curl_cwriter_create(&ftp_lc_writer, data, &ftp_cw_lc,
+ CURL_CW_CONTENT_DECODE);
+ if(result)
+ return result;
- result = Curl_cwriter_add(data, ftp_lc_writer);
- if(result) {
- Curl_cwriter_free(data, ftp_lc_writer);
- return result;
- }
+ result = Curl_cwriter_add(data, ftp_lc_writer);
+ if(result) {
+ Curl_cwriter_free(data, ftp_lc_writer);
+ return result;
}
-#endif /* CURL_DO_LINEEND_CONV */
if(data->state.wildcardmatch) {
result = wc_statemach(data);
clen = r->crt->total_length(data, r);
/* if we do not have 0 length init, and crlf conversion is wanted,
* add the reader for it */
- if(clen && (data->set.crlf
-#ifdef CURL_DO_LINEEND_CONV
- || data->state.prefer_ascii
-#endif
- )) {
+ if(clen && (data->set.crlf || data->state.prefer_ascii)) {
result = cr_lc_add(data);
if(result)
return result;
#define CURL_DEFAULT_USER "anonymous"
#define CURL_DEFAULT_PASSWORD "ftp@example.com"
-#if !defined(_WIN32) && !defined(MSDOS) && !defined(__EMX__)
-/* do FTP line-end conversions on most platforms */
-#define CURL_DO_LINEEND_CONV
-#endif
-
/* Convenience defines for checking protocols or their SSL based version. Each
protocol handler should only ever have a single CURLPROTO_ in its protocol
field. */