curl-library
RE: removing a set option (curl_easy_setopt) once it has been set
Date: Mon, 12 Mar 2012 15:28:47 +0000
Hi Jonathon,
> Is there a way to remove an option once it has been set with
> curl_easy_setopt? I've read the curl_easy_setop document, and it
> doesn't describe a way.
For long variables I tend to set them back to zero and whilst I've not
explicitly had to clear a string variable in Curl yet I would imagine that
you can simply set it to NULL.
As Curl calls strdup() when setting string variables this should free the
previous memory and then strdup() should fail and return a null pointer
(thus setting it back to its original state) ;-)
Kind regards
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-12