From 74d5a6fb3b9a96d9fa51ba90996e94c878ebd151 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Oct 2001 11:57:50 +0000 Subject: curl_easy_duphandle() now properly clones the cookie option - patch by T. Bharath --- lib/easy.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3