From: Daniel Stenberg Date: Fri, 19 Oct 2001 11:57:50 +0000 (+0000) Subject: curl_easy_duphandle() now properly clones the cookie option X-Git-Tag: curl-7_9_1~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74d5a6fb3b9a96d9fa51ba90996e94c878ebd151;p=thirdparty%2Fcurl.git curl_easy_duphandle() now properly clones the cookie option - patch by T. Bharath --- diff --git a/lib/easy.c b/lib/easy.c index 43edce5f89..245bbf955c 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);