Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURLOPT_COOKIEFILE is not dup'ed in curl_easy_duphandle() #10133

Closed
bagder opened this issue Dec 22, 2022 · 0 comments
Closed

CURLOPT_COOKIEFILE is not dup'ed in curl_easy_duphandle() #10133

bagder opened this issue Dec 22, 2022 · 0 comments

Comments

@bagder
Copy link
Member

bagder commented Dec 22, 2022

I did this

Use (multiple) CURLOPT_COOKIEFILE for an easy handle to load cookies from multiple input files.

Then call curl_easy_duphandle() and run an identical transfer. The cookies are not loaded from the files set to be used in the original handle.

I expected the following

curl_easy_duphandle() is intended to make a "perfect" copy and should then also keep the list of file names to read from.

curl/libcurl version

7.87.0 and all previous versions

operating system

independent

@bagder bagder self-assigned this Dec 22, 2022
bagder added a commit that referenced this issue Dec 22, 2022
The cookiefile entries are set into the handle and should remain set for
the lifetime of the handle so that duplicating it also duplicates the
list. Therefore, the struct field is moved from 'state' to 'set'.

Fixes #10133
@bagder bagder closed this as completed in af5999a Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant