]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_easy_duphandle() now properly clones the cookie option
authorDaniel Stenberg <daniel@haxx.se>
Fri, 19 Oct 2001 11:57:50 +0000 (11:57 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Oct 2001 11:57:50 +0000 (11:57 +0000)
- patch by T. Bharath

lib/easy.c

index 43edce5f89d46c552f6a40b9c54ac2143fd5741b..245bbf955c518ec95d06f44406e1702d2feeb1aa 100644 (file)
@@ -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);