cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Impossible to POST binary data with CURLOPT_POSTFIELDS

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 11 Oct 2007 23:53:21 +0200 (CEST)

On Thu, 11 Oct 2007, Dan Fandrich wrote:

> - If CURLOPT_POSTFIELDSIZE *was* already set, copy that much data in
> CURLOPT_POSTFIELDS instead of strdup().
>
> - If it was *not* already set, do strdup() (as now); when
> CURLOPT_POSTFIELDSIZE is set, compare the value to the amount of data
> actually copied. If it's equal, great. If it's not, do the copy again,
> right this time.

Yes, that's a better approach than my previous suggestion. And since the
7.17.0 approach is broken anyway, I think getting back to how things worked
pre-7.17.0 is sensible. I mean, so that the lib works with code as it was
written and working before 7.17.0.

Will you do the fix? I'm running a bit short of time here...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-10-12