diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-08-17 08:55:43 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-08-17 08:55:43 +0000 |
commit | a676c18502d5ec3128db11accf04d6de3f9be949 (patch) | |
tree | 71335eb19d493e7322337c3e66d19f7f5e146ee2 /lib/transfer.c | |
parent | 362912ff838d09a57e21827a3c148a52fca3af03 (diff) |
- Jeff Pohlmeyer found out that if you ask libcurl to load a cookiefile (with
CURLOPT_COOKIEFILE), add a cookie (with CURLOPT_COOKIELIST), tell it to
write the result to a given cookie jar and then never actually call
curl_easy_perform() - the given file(s) to read was never read but the
output file was written and thus it caused a "funny" result.
- While doing some tests for the bug above, I noticed that Firefox generates
large numbers (for the expire time) in the cookies.txt file and libcurl
didn't treat them properly. Now it does.
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 544ac8560..8f885f5d9 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1641,25 +1641,9 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) data->state.authhost.want = data->set.httpauth; data->state.authproxy.want = data->set.proxyauth; -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - /* 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; - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - while(list) { - data->cookies = Curl_cookie_init(data, - list->data, - data->cookies, - data->set.cookiesession); - list = list->next; - } - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - curl_slist_free_all(data->change.cookielist); /* clean up list */ - data->change.cookielist = NULL; /* don't do this again! */ - } -#endif /* CURL_DISABLE_HTTP */ - + /* If there is a list of cookie files to read, do it now! */ + if(data->change.cookielist) + Curl_cookie_loadfiles(data); /* 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 |