From: Daniel Stenberg Date: Mon, 14 Feb 2000 23:17:59 +0000 (+0000) Subject: added support for -b@[file name] and -b@- (for stdin) for consistency X-Git-Tag: curl-6_5~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1db1e8a2306769ac238cf90aa3e5d48920ae536;p=curl added support for -b@[file name] and -b@- (for stdin) for consistency --- diff --git a/src/main.c b/src/main.c index 7b7dcdf02..3c33025ae 100644 --- a/src/main.c +++ b/src/main.c @@ -439,14 +439,16 @@ static int getparameter(char *flag, /* f or -long-flag */ GetStr(&config->useragent, nextarg); break; case 'b': /* cookie string coming up: */ - if(strchr(nextarg, '=')) { + if(nextarg[0] == '@') { + nextarg++; + } + else if(strchr(nextarg, '=')) { /* A cookie string must have a =-letter */ GetStr(&config->cookie, nextarg); + break; } - else { - /* We have a cookie file to read from! */ - GetStr(&config->cookiefile, nextarg); - } + /* We have a cookie file to read from! */ + GetStr(&config->cookiefile, nextarg); break; case 'B': /* use type ASCII when transfering ftp files */