aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.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/transfer.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/transfer.c')
-rw-r--r--lib/transfer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 247e40286..198864c30 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1195,6 +1195,22 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
data->state.this_is_a_follow = FALSE; /* reset this */
data->state.errorbuf = FALSE; /* no error has occurred */
+ /* If there was a list of cookie files to read and we haven't done it before,
+ do it now! */
+ if(data->change.cookielist) {
+ struct curl_slist *list = data->change.cookielist;
+ while(list) {
+ data->cookies = Curl_cookie_init(list->data,
+ data->cookies,
+ data->set.cookiesession);
+ list = list->next;
+ }
+ curl_slist_free_all(data->change.cookielist); /* clean up list */
+ data->change.cookielist = NULL; /* don't do this again! */
+ }
+
+
+
/* Allow data->set.use_port to set which port to use. This needs to be
* disabled for example when we follow Location: headers to URLs using
* different ports! */