aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-19 11:57:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-19 11:57:50 +0000
commit74d5a6fb3b9a96d9fa51ba90996e94c878ebd151 (patch)
tree69735c28f26dbf619679c310692c1529513e4504 /lib
parent83da58ce912c4de0cff3e0a5906a4a624c630f61 (diff)
curl_easy_duphandle() now properly clones the cookie option
- patch by T. Bharath
Diffstat (limited to 'lib')
-rw-r--r--lib/easy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 43edce5f8..245bbf955 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -293,6 +293,12 @@ CURL *curl_easy_duphandle(CURL *incurl)
outcurl->progress.flags = data->progress.flags;
outcurl->progress.callback = data->progress.callback;
+ if(data->cookies)
+ /* If cookies are enabled in the parent handle, we enable them
+ in the clone as well! */
+ outcurl->cookies = Curl_cookie_init(data->cookies->filename,
+ outcurl->cookies);
+
/* duplicate all values in 'change' */
if(data->change.url) {
outcurl->change.url = strdup(data->change.url);