1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

added support for -b@[file name] and -b@- (for stdin) for consistency

This commit is contained in:
Daniel Stenberg 2000-02-14 23:17:59 +00:00
parent 158920cc34
commit a1db1e8a23

View File

@ -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 */