cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Cookies on one domain and posting to another

From: Lars Nilsson <chamaeleon_at_gmail.com>
Date: Tue, 8 Feb 2011 10:30:02 -0500

On Tue, Feb 8, 2011 at 9:50 AM, Niall Twomey <twomers_at_gmail.com> wrote:
>     curl_formadd( &formpost,
>                   &lastptr,
>                   CURLFORM_COPYNAME,    it->first.c_str(),
>                   CURLFORM_PTRCONTENTS, it->second.c_str(),
>                   CURLFORM_END );
...
>   curl_formfree( formpost );

Perhaps you're blowing away memory held by it->second (which should be
managed by the std::string destructor), when you use curl_formfree().
Perhaps CURLFORM_COPYCONTENTS would be appropriate?

Lars Nilsson
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-08