mirror of
https://github.com/curl/curl.git
synced 2026-08-25 03:23:32 +03:00
cookies: Support multiple -b parameters
Previously only a single -b cookie parameter was supported with the last one winning. This adds support for supplying multiple -b params to have them serialized semicolon separated. Both cookiefiles and cookies can be entered multiple times. Closes #6649 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
This commit is contained in:
parent
1b2098c3c9
commit
82c583dcf0
7 changed files with 48 additions and 15 deletions
|
|
@ -1320,11 +1320,15 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
}
|
||||
else if(strchr(nextarg, '=')) {
|
||||
/* A cookie string must have a =-letter */
|
||||
GetStr(&config->cookie, nextarg);
|
||||
err = add2list(&config->cookies, nextarg);
|
||||
if(err)
|
||||
return err;
|
||||
break;
|
||||
}
|
||||
/* We have a cookie file to read from! */
|
||||
GetStr(&config->cookiefile, nextarg);
|
||||
err = add2list(&config->cookiefiles, nextarg);
|
||||
if(err)
|
||||
return err;
|
||||
}
|
||||
break;
|
||||
case 'B':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue