aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
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! */