aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-08-19 21:18:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-08-19 21:18:36 +0000
commitcfdcae4bc75fba04b9864cae18e0bbe66b8655b9 (patch)
tree2012bd78cd739dddfcd85bdaae543919af7be23f /lib/sendf.c
parent74a6921bc454fcbf842a221e95ba5dc09b19049e (diff)
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.
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index d598197bd..b38415c3e 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -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;