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: Unhandled exceptionwhenusingcurl_easy_perform()inVisualStudio2005 on Windows XP.

From: Xu Xiaogang-a19881 <nickxu_at_motorola.com>
Date: Thu, 5 Jun 2008 10:36:16 +0800

Thanks a lot for your help. It can work now.

Regards
-Xiaogang

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Nathan E. Moore
Sent: 200864 20:55
To: libcurl development
Subject: RE: Unhandled exceptionwhenusingcurl_easy_perform()inVisualStudio2005 on Windows XP.

--On Wednesday, June 04, 2008 4:30 PM +0800 Xu Xiaogang-a19881 <nickxu_at_motorola.com> wrote:
>
> CURLcode setPostField(string post_content)
> {
> CURLcode errornum;
> errornum = curl_easy_setopt (curl, CURLOPT_POSTFIELDS,
> post_content.c_str());
>
> if (errornum != CURLE_OK)
> {
> throw curl_easy_strerror(errornum);
> }
>
> return CURLE_OK;
> }
>

With the current version your problem is here. The CURLOPT_POSTFIELDS option does NOT copy the buffer. You should try switching to CURLOPT_COPYPOSTFIELDS as it does copy the data.

Nathan Moore
Received on 2008-06-05

These mail archives are generated by hypermail.

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

File upload with ASP.NET