On Fri, Mar 25, 2011 at 12:26:22AM -0400, [email protected] wrote:
> When setting the URL with:
> 
> CURLcode res = curl_easy_setopt (h->curlhandle, CURLOPT_URL,
> szloginurl);
> 
> Is it necessary that szloginurl be in scope when curl_easy_perform()
> is run?

This is documented in the curl_easy_setopt man page:

       Strings  passed  to  libcurl  as  'char  *' arguments, are
       copied by the library; thus the string storage  associated
       to   the   pointer   argument  may  be  overwritten  after
       curl_easy_setopt() returns. Exceptions to  this  rule  are
       described in the option details below.

       Before  version  7.17.0,  strings were not copied. Instead
       the user was forced keep them available until  libcurl  no
       longer needed them.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to