cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Strange behavior of CURLOPT_POSTFIELDS

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Dec 2012 22:34:17 +0100 (CET)

On Mon, 17 Dec 2012, Jeff Pohlmeyer wrote:

> The man page for CURLOPT_POSTFIELDS ( version 7.28.1 ) says:
>
> "The pointed data are NOT copied by the library: as a consequence, they must
> be preserved by the calling application until the transfer finishes."

Gah, I'm stupid. Sorry for the noise but of course you're right. I was too
stuck in thinking about the generic "string" options and not
CURLOPT_POSTFIELDS specifically.

Thanks for correcting me!

CURLOPT_POSTFIELDS does not copy the string. CURLOPT_COPYPOSTFIELDS copies the
string!

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