mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:53:39 +03:00
setopt: acknowledge errors proper for CURLOPT_COOKIEJAR
Error out on error, do not continue. Closes #13624
This commit is contained in:
parent
6080805daa
commit
9d6d614264
1 changed files with 12 additions and 14 deletions
26
lib/setopt.c
26
lib/setopt.c
|
|
@ -779,22 +779,20 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
/*
|
||||
* Set cookie file name to dump all cookies to when we're done.
|
||||
*/
|
||||
{
|
||||
struct CookieInfo *newcookies;
|
||||
result = Curl_setstropt(&data->set.str[STRING_COOKIEJAR],
|
||||
va_arg(param, char *));
|
||||
|
||||
/*
|
||||
* Activate the cookie parser. This may or may not already
|
||||
* have been made.
|
||||
*/
|
||||
newcookies = Curl_cookie_init(data, NULL, data->cookies,
|
||||
data->set.cookiesession);
|
||||
if(!newcookies)
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
data->cookies = newcookies;
|
||||
}
|
||||
break;
|
||||
if(!result) {
|
||||
/*
|
||||
* Activate the cookie parser. This may or may not already
|
||||
* have been made.
|
||||
*/
|
||||
struct CookieInfo *newcookies =
|
||||
Curl_cookie_init(data, NULL, data->cookies, data->set.cookiesession);
|
||||
if(!newcookies)
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
data->cookies = newcookies;
|
||||
}
|
||||
break;
|
||||
|
||||
case CURLOPT_COOKIESESSION:
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue