diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 3e717a3d2..af20a396c 100644 --- a/src/main.c +++ b/src/main.c @@ -353,6 +353,7 @@ struct Configurable { struct curl_slist *tp_postquote; struct curl_slist *tp_prequote; char *ftp_account; /* for ACCT */ + char *ftp_alternative_to_user; /* send command if USER/PASS fails */ int ftp_filemethod; bool ignorecl; /* --ignore-content-length */ @@ -1340,6 +1341,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"$r", "ftp-method", TRUE}, {"$s", "local-port", TRUE}, {"$t", "socks4", TRUE}, + {"$u", "ftp-alternative-to-user", TRUE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, @@ -1776,6 +1778,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ } } break; + case 'u': /* --ftp-alternative-to-user */ + GetStr(&config->ftp_alternative_to_user, nextarg); + break; } break; case '#': /* --progress-bar */ @@ -3998,6 +4003,9 @@ operate(struct Configurable *config, int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, config->localportrange); } + /* curl x.xx.x */ + curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, config->ftp_alternative_to_user); + retry_numretries = config->req_retry; retrystart = curlx_tvnow(); |