Loading include/curl/curl.h +3 −0 Original line number Diff line number Diff line Loading @@ -494,6 +494,9 @@ typedef enum { /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), /* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/ CINIT(PREQUOTE, OBJECTPOINT, 93), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; Loading lib/ftp.c +12 −0 Original line number Diff line number Diff line Loading @@ -1618,6 +1618,12 @@ CURLcode ftp_perform(struct connectdata *conn) if(result) return result; /* Send any PREQUOTE strings after transfer type is set? (Wesley Laxton)*/ if(data->set.prequote) { if ((result = ftp_sendquote(conn, data->set.prequote)) != CURLE_OK) return result; } if(conn->resume_from) { /* we're about to continue the uploading of a file */ /* 1. get already existing file's size. We use the SIZE Loading Loading @@ -1803,6 +1809,12 @@ CURLcode ftp_perform(struct connectdata *conn) if(result) return result; /* Send any PREQUOTE strings after transfer type is set? (Wesley Laxton)*/ if(data->set.prequote) { if ((result = ftp_sendquote(conn, data->set.prequote)) != CURLE_OK) return result; } /* Attempt to get the size, it'll be useful in some cases: for resumed downloads and when talking to servers that don't give away the size in the RETR response line. */ Loading lib/url.c +8 −2 Original line number Diff line number Diff line Loading @@ -735,6 +735,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) */ data->set.postquote = va_arg(param, struct curl_slist *); break; case CURLOPT_PREQUOTE: /* * List of RAW FTP commands to use prior to RETR (Wesley Laxton) */ data->set.prequote = va_arg(param, struct curl_slist *); break; case CURLOPT_QUOTE: /* * List of RAW FTP commands to use before a transfer Loading Loading @@ -1983,8 +1989,8 @@ static CURLcode CreateConnection(struct SessionHandle *data, conn = conn_temp; /* use this connection from now on */ /* we need these pointers if we speak over a proxy */ conn->hostname = old_conn->gname; conn->name = old_conn->name; conn->hostname = conn->gname; conn->name = &conn->gname[old_conn->name - old_conn->gname]; free(conn->path); /* free the previously allocated path pointer */ Loading lib/urldata.h +2 −1 Original line number Diff line number Diff line Loading @@ -604,8 +604,9 @@ struct UserDefined { char *crypto_engine; /* name of the crypto engine to use */ char *cookiejar; /* dump all cookies to this file */ bool crlf; /* convert crlf on ftp upload(?) */ struct curl_slist *quote; /* before the transfer */ struct curl_slist *quote; /* after connection is established */ struct curl_slist *postquote; /* after the transfer */ struct curl_slist *prequote; /* before the transfer, after type (Wesley Laxton)*/ struct curl_slist *telnet_options; /* linked list of telnet options */ curl_TimeCond timecondition; /* kind of time/date comparison */ time_t timevalue; /* what time to compare with */ Loading src/main.c +10 −3 Original line number Diff line number Diff line Loading @@ -448,6 +448,7 @@ struct Configurable { struct curl_slist *quote; struct curl_slist *postquote; struct curl_slist *prequote; long ssl_version; curl_TimeCond timecond; Loading Loading @@ -1376,12 +1377,18 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'Q': /* QUOTE command to send to FTP server */ if(nextarg[0] == '-') { switch(nextarg[0]) { case '-': /* prefixed with a dash makes it a POST TRANSFER one */ nextarg++; config->postquote = curl_slist_append(config->postquote, nextarg); } else { break; case '+': /* prefixed with a plus makes it a just-before-transfer one */ nextarg++; config->prequote = curl_slist_append(config->prequote, nextarg); break; default: config->quote = curl_slist_append(config->quote, nextarg); } break; Loading Loading
include/curl/curl.h +3 −0 Original line number Diff line number Diff line Loading @@ -494,6 +494,9 @@ typedef enum { /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), /* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/ CINIT(PREQUOTE, OBJECTPOINT, 93), CURLOPT_LASTENTRY /* the last unusued */ } CURLoption; Loading
lib/ftp.c +12 −0 Original line number Diff line number Diff line Loading @@ -1618,6 +1618,12 @@ CURLcode ftp_perform(struct connectdata *conn) if(result) return result; /* Send any PREQUOTE strings after transfer type is set? (Wesley Laxton)*/ if(data->set.prequote) { if ((result = ftp_sendquote(conn, data->set.prequote)) != CURLE_OK) return result; } if(conn->resume_from) { /* we're about to continue the uploading of a file */ /* 1. get already existing file's size. We use the SIZE Loading Loading @@ -1803,6 +1809,12 @@ CURLcode ftp_perform(struct connectdata *conn) if(result) return result; /* Send any PREQUOTE strings after transfer type is set? (Wesley Laxton)*/ if(data->set.prequote) { if ((result = ftp_sendquote(conn, data->set.prequote)) != CURLE_OK) return result; } /* Attempt to get the size, it'll be useful in some cases: for resumed downloads and when talking to servers that don't give away the size in the RETR response line. */ Loading
lib/url.c +8 −2 Original line number Diff line number Diff line Loading @@ -735,6 +735,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) */ data->set.postquote = va_arg(param, struct curl_slist *); break; case CURLOPT_PREQUOTE: /* * List of RAW FTP commands to use prior to RETR (Wesley Laxton) */ data->set.prequote = va_arg(param, struct curl_slist *); break; case CURLOPT_QUOTE: /* * List of RAW FTP commands to use before a transfer Loading Loading @@ -1983,8 +1989,8 @@ static CURLcode CreateConnection(struct SessionHandle *data, conn = conn_temp; /* use this connection from now on */ /* we need these pointers if we speak over a proxy */ conn->hostname = old_conn->gname; conn->name = old_conn->name; conn->hostname = conn->gname; conn->name = &conn->gname[old_conn->name - old_conn->gname]; free(conn->path); /* free the previously allocated path pointer */ Loading
lib/urldata.h +2 −1 Original line number Diff line number Diff line Loading @@ -604,8 +604,9 @@ struct UserDefined { char *crypto_engine; /* name of the crypto engine to use */ char *cookiejar; /* dump all cookies to this file */ bool crlf; /* convert crlf on ftp upload(?) */ struct curl_slist *quote; /* before the transfer */ struct curl_slist *quote; /* after connection is established */ struct curl_slist *postquote; /* after the transfer */ struct curl_slist *prequote; /* before the transfer, after type (Wesley Laxton)*/ struct curl_slist *telnet_options; /* linked list of telnet options */ curl_TimeCond timecondition; /* kind of time/date comparison */ time_t timevalue; /* what time to compare with */ Loading
src/main.c +10 −3 Original line number Diff line number Diff line Loading @@ -448,6 +448,7 @@ struct Configurable { struct curl_slist *quote; struct curl_slist *postquote; struct curl_slist *prequote; long ssl_version; curl_TimeCond timecond; Loading Loading @@ -1376,12 +1377,18 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'Q': /* QUOTE command to send to FTP server */ if(nextarg[0] == '-') { switch(nextarg[0]) { case '-': /* prefixed with a dash makes it a POST TRANSFER one */ nextarg++; config->postquote = curl_slist_append(config->postquote, nextarg); } else { break; case '+': /* prefixed with a plus makes it a just-before-transfer one */ nextarg++; config->prequote = curl_slist_append(config->prequote, nextarg); break; default: config->quote = curl_slist_append(config->quote, nextarg); } break; Loading