]> granicus.if.org Git - curl/commitdiff
added support for -b@[file name] and -b@- (for stdin) for consistency
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 Feb 2000 23:17:59 +0000 (23:17 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 Feb 2000 23:17:59 +0000 (23:17 +0000)
src/main.c

index 7b7dcdf0298e1d151987de77338112a0d7523967..3c33025ae1a278c2c54980904632baa441b8e84e 100644 (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 */