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:
parent
158920cc34
commit
a1db1e8a23
12
src/main.c
12
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user