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

@ -311,11 +311,11 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
CURLcode result;
snprintf(buf, sizeof(data->state.buffer),
"Content-Length: %" FORMAT_OFF_T "\r\n", expected_size);
result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
if(result)
return result;
result = Curl_client_write(data, CLIENTWRITE_BOTH,
result = Curl_client_write(conn, CLIENTWRITE_BOTH,
(char *)"Accept-ranges: bytes\r\n", 0);
if(result)
return result;
@ -339,7 +339,7 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
tm->tm_hour,
tm->tm_min,
tm->tm_sec);
result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
}
return result;
}
@ -377,7 +377,7 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
bytecount += nread;
res = Curl_client_write(data, CLIENTWRITE_BODY, buf, nread);
res = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread);
if(res)
return res;