From: Daniel Stenberg Date: Mon, 13 Nov 2023 18:55:28 +0000 (+0100) Subject: easy: in duphandle, init the cookies for the new handle X-Git-Tag: curl-8_5_0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34eddaac922aca4a9a61fe353f8e1bd7c86ac4c9;p=thirdparty%2Fcurl.git easy: in duphandle, init the cookies for the new handle ... not the source handle. Closes #12318 --- diff --git a/lib/easy.c b/lib/easy.c index 3341f46614..f97003fc66 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -914,10 +914,10 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) outcurl->progress.callback = data->progress.callback; #ifndef CURL_DISABLE_COOKIES - if(data->cookies) { + if(data->cookies && data->state.cookie_engine) { /* If cookies are enabled in the parent handle, we enable them in the clone as well! */ - outcurl->cookies = Curl_cookie_init(data, NULL, outcurl->cookies, + outcurl->cookies = Curl_cookie_init(outcurl, NULL, outcurl->cookies, data->set.cookiesession); if(!outcurl->cookies) goto fail;