cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_slist

From: Steve Dekorte <stevedekorte_at_yahoo.com>
Date: Wed, 3 Jul 2002 22:45:11 -0700 (PDT)

Is this the proper way to use a curl_slist to set a
single header value?

    char *s = (char *)malloc(length+1);
    memset(s, 0x0, length+1);
    {
      struct curl_slist *slist = (struct curl_slist
*)malloc(sizeof(struct curl_slist));
      slist->data = s;
      slist->next = (void *)0x0;
      curl_easy_setopt(curl_handle,
CURLOPT_HTTPHEADER, slist);
    }

Curl is responsible for freeing it, right?

Steve

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
Received on 2002-07-04