cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_COOKIELIST side effects

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Tue, 16 Aug 2005 21:05:35 -0500

Hello,

I've been trying to get a feel for the new cookie interface, and
I noticed the code below will clobber an existing cookie file.

Is this the intended behavior?

#include <curl/curl.h>
int main(void) {
  CURL* curl = curl_easy_init();
  curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookies.txt");
  curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt");
  curl_easy_setopt(curl, CURLOPT_COOKIELIST,
    ".example.com\tTRUE\t/\tFALSE\t0\tname\tvalue");
  curl_easy_cleanup(curl);
  return 0;
}

Thanks,
 - Jeff
Received on 2005-08-17