cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: [Q]: http proxy authorization using libcurl --III?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Aug 2003 11:32:47 +0200 (CEST)

On Mon, 11 Aug 2003, James Kuo wrote:

> When I changed the above code to the following, it worked. It means that
> curl only copy the address of variables, not the cotents of the variables.
> The same situation occurred in sending username and passwd to curl.

Oh indeed. As the man page for curl_easy_setopt clearly states:

  strings passed to libcurl as 'char *' arguments, will not be
  copied by the library. Instead you should keep them available until libcurl
  no longer needs them. Failing to do so will cause very odd behavior or even
  crashes. libcurl will need them until you call curl_easy_cleanup() or you
  set the same option again to use a different pointer.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET