|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Bugs-1811551 ] Impossible to post binary data with CURLOPT_POSTFIELDS
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 22 Oct 2007 02:00:27 -0700
Bugs item #1811551, was opened at 2007-10-11 15:38
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
On August 1st url.c was changed (Revision 1.631) to make a copy of post data so
that the caller need not keep the post buffer arround while curl operates,
unfortunatly this change has broken binary http posts since the code now does a
strdup.
See: Curl_setstropt
It isn't possible to remedy this and keep the new semantics. The options for a fix
are therefore:
0) Revert the code to do what it did before and require the buffer to be present
durring the action
1) As (0) and then add a new api to make a copy of the post data
** The following options would change the API and application compatability:
2) Change CURLOPT_POSTFIELDS to include a size parameter
3) Require CURLOPT_POSTFIELDSIZE to be called first
In my copy of libcurl I have done (3) for the moment, but I have not proper fix as
it involved changing the api or adding a new one.
To reproduce
I used wireshark to monitor the network traffic, and stepping into the code.
char buffer[] = "only\0the first word will get sent.";
curl_easy_setopt(curl, CURLOPT_URL, "http://<any-server>");
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Message:
Fixed in CVS.
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info