Commit a1db1e8a authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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

parent 158920cc
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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);
      }
      break;
    case 'B':
      /* use type ASCII when transfering ftp files */