Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE

command on subsequent requests on a re-used connection unless it has to.
This commit is contained in:
Daniel Stenberg
2006-08-19 21:18:36 +00:00
parent 74a6921bc4
commit cfdcae4bc7
23 changed files with 139 additions and 99 deletions

View File

@@ -367,18 +367,19 @@ CURLcode Curl_write(struct connectdata *conn,
The bit pattern defines to what "streams" to write to. Body and/or header.
The defines are in sendf.h of course.
*/
CURLcode Curl_client_write(struct SessionHandle *data,
CURLcode Curl_client_write(struct connectdata *conn,
int type,
char *ptr,
size_t len)
{
struct SessionHandle *data = conn->data;
size_t wrote;
if(0 == len)
len = strlen(ptr);
if(type & CLIENTWRITE_BODY) {
if(data->ftp_in_ascii_mode) {
if((conn->protocol&PROT_FTP) && conn->proto.ftp->transfertype == 'A') {
#ifdef CURL_DOES_CONVERSIONS
/* convert from the network encoding */
size_t rc;