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

@@ -261,7 +261,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
CURLcode res = CURLE_OK;
/* Set ascii mode if -B flag was used */
if(data->set.ftp_ascii)
if(data->set.prefer_ascii)
mode = "netascii";
switch(event) {
@@ -699,7 +699,7 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
/* Don't pass to the client empty or retransmitted packets */
if (state->rbytes > 4 &&
((state->block+1) == getrpacketblock(&state->rpacket))) {
code = Curl_client_write(data, CLIENTWRITE_BODY,
code = Curl_client_write(conn, CLIENTWRITE_BODY,
(char *)&state->rpacket.data[4],
state->rbytes-4);
if(code)