mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
easy: in duphandle, init the cookies for the new handle
... not the source handle. Closes #12318
This commit is contained in:
parent
baf7b803b3
commit
34eddaac92
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user