cURL / Mailing Lists / curl-library / Single Mail

curl-library

Getting CURLOPT_HTTPHEADER back to normal?

From: Casey ODonnell <caseyodonnell_at_gmail.com>
Date: Tue, 22 Jun 2004 13:15:39 -0400

I'm setting a custom header:

struct curl_slist *pHeaders = NULL;

pHeaders = curl_slist_append(pHeaders, "Depth: 1");

... // Other setopts

curl_easy_setopt(m_pCURL, CURLOPT_HTTPHEADER, pHeaders);

... // Other setopts

res = curl_easy_perform(m_pCURL);

curl_slist_free_all(pHeaders);

This is all well and good. However, if I want to re-use this same
CURL* handle, I've obviously messed up, because my header has been
de-allocated (not the whole header, just the depth one, and I'm
assuming here too.). However, I don't really want my other calls to
use this header at all. How do I tell LibCURL to just get rid of that
header, and go back to its standard headers?

Thanks for the help.

Casey
Received on 2004-06-22