Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Correct way to disable cookies temporarily
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Ray Satiro via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 23 Jan 2024 16:30:40 -0500
On 1/23/2024 11:35 AM, Daniel Stenberg via curl-library wrote:
> On Tue, 23 Jan 2024, Max via curl-library wrote:
>
>> I have not found in the documentation what is the correct way to
>> disable an existing set of cookies (in the cookies engine)
>> temporarily (that means for the next single connection where I do not
>> have to send any cookie, including persistent ones).
>
> I think the best way is to create and use a separate easy handle for
> that transfer.
You can probably do it with a curl shared object with cookies but you
would have to disable the whole shared object to do it:
"If you add a share that is set to share cookies, your easy handle uses
that cookie cache and get the cookie engine enabled. If you stop sharing
an object that was using cookies (or change to another object that does
not share cookies), the easy handle gets its cookie engine disabled." [1]
[1]: https://curl.se/libcurl/c/CURLOPT_SHARE.html
Date: Tue, 23 Jan 2024 16:30:40 -0500
On 1/23/2024 11:35 AM, Daniel Stenberg via curl-library wrote:
> On Tue, 23 Jan 2024, Max via curl-library wrote:
>
>> I have not found in the documentation what is the correct way to
>> disable an existing set of cookies (in the cookies engine)
>> temporarily (that means for the next single connection where I do not
>> have to send any cookie, including persistent ones).
>
> I think the best way is to create and use a separate easy handle for
> that transfer.
You can probably do it with a curl shared object with cookies but you
would have to disable the whole shared object to do it:
"If you add a share that is set to share cookies, your easy handle uses
that cookie cache and get the cookie engine enabled. If you stop sharing
an object that was using cookies (or change to another object that does
not share cookies), the easy handle gets its cookie engine disabled." [1]
[1]: https://curl.se/libcurl/c/CURLOPT_SHARE.html
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-01-23