aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-17 07:10:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-17 07:10:39 +0000
commit156aad198f4708f041fbe35ecfb18b875176317d (patch)
tree146f3747f7b9576fe6c5560596c8f52484e52daf /lib/url.c
parentb1ffb79a504b732a864b47ed718b53ce0f0f0db2 (diff)
Make the COOKIESESSION work better by creating a list of cookie files files
when given in the curl_easy_setopt() and then parse them all on the first curl_easy_perform() call instead.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index c55ebdb19..eb4003b22 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -183,6 +183,9 @@ CURLcode Curl_close(struct SessionHandle *data)
if (data->share)
data->share->dirty--;
+ if(data->change.cookielist) /* clean up list if any */
+ curl_slist_free_all(data->change.cookielist);
+
if(data->state.auth_host)
free(data->state.auth_host);
@@ -552,8 +555,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
*/
cookiefile = (char *)va_arg(param, void *);
if(cookiefile)
- data->cookies = Curl_cookie_init(cookiefile, data->cookies,
- data->set.cookiesession);
+ /* append the cookie file name to the list of file names, and deal with
+ them later */
+ data->change.cookielist =
+ curl_slist_append(data->change.cookielist, cookiefile);
break;
case CURLOPT_COOKIEJAR: