From 26e8ccc63151a1c12db709cef4051803afd21189 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Jan 2000 23:36:14 +0000 Subject: syncing with local edit --- src/main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 5666c777e..a5f38138a 100644 --- a/src/main.c +++ b/src/main.c @@ -180,6 +180,7 @@ struct Configurable { FILE *errors; /* if stderr redirect is requested */ struct curl_slist *quote; + struct curl_slist *postquote; long ssl_version; TimeCond timecond; @@ -595,7 +596,14 @@ static int getparameter(char *flag, /* f or -long-flag */ break; case 'Q': /* QUOTE command to send to FTP server */ - config->quote = curl_slist_append(config->quote, nextarg); + if(nextarg[0] == '-') { + /* prefixed with a dash makes it a POST TRANSFER one */ + nextarg++; + config->postquote = curl_slist_append(config->postquote, nextarg); + } + else { + config->quote = curl_slist_append(config->quote, nextarg); + } break; case 'r': /* byte range requested */ @@ -850,8 +858,10 @@ int main(int argc, char *argv[]) "%s", curl_version()); config.showerror=TRUE; config.conf=CONF_DEFAULT; +#if 0 config.crlf=FALSE; config.quote=NULL; +#endif if(argc>1 && (!strnequal("--", argv[1], 2) && (argv[1][0] == '-')) && @@ -1108,6 +1118,7 @@ int main(int argc, char *argv[]) URGTAG_SSLCERTPASSWD, config.cert_passwd, URGTAG_CRLF, config.crlf, URGTAG_QUOTE, config.quote, + URGTAG_POSTQUOTE, config.postquote, URGTAG_WRITEHEADER, headerfilep, URGTAG_COOKIEFILE, config.cookiefile, URGTAG_SSLVERSION, config.ssl_version, -- cgit v1.2.3