curl / Mailing Lists / curl-library / Single Mail
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.

Correct way to disable cookies temporarily

From: Max via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 23 Jan 2024 17:10:33 +0100

Hello.
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).

If I disable the cookie engine setting CURLOPT_COOKIEFILE to NULL all existing cookies get deleted (and I do not want this, nor it's ideal to save and reload).

If I set headers as "Cookie:" or "Cookie;" via slist and CURLOPT_HTTPREADER I do not get to the result I want

If I set CURLOPT_COOKIE to NULL the existing cookie appear undisturbed in my header (very strange).

What is the correct way?

Thank you very much for the help!






-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-01-23