cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Strange behavior of CURLOPT_POSTFIELDS

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Mon, 17 Dec 2012 12:57:52 -0600

On Mon, Dec 17, 2012 at 12:20 PM, Bian, Jiang <JBian_at_uams.edu> wrote:
>
> One strange thing is:
>
>
> if I have a const char* string literal in CURLOPT_POSTFIELDS it works. If
> it's not coming from a literal, it fails.

Are you using a local variable to store the paramsString?
I think that won't work, the string must remain in scope until
curl_easy_perform() returns.

 - Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-17