aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-02-14 23:17:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-02-14 23:17:59 +0000
commita1db1e8a2306769ac238cf90aa3e5d48920ae536 (patch)
tree6bcbf45f80dc76be89a9b31251ae7d10693854a8
parent158920cc34918589b424f7c74f6866495a2601dc (diff)
added support for -b@[file name] and -b@- (for stdin) for consistency
-rw-r--r--src/main.c12
1 files changed, 7 insertions, 5 deletions
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 */