cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to POST binary data with libcurl?

From: Tillmann Steinbrecher <tsteinbr_at_igd.fraunhofer.de>
Date: Thu, 27 Jul 2006 14:01:30 +0200

Hi,

Daniel Stenberg wrote:
> > On Wed, 26 Jul 2006, Tillmann Steinbrecher wrote:
> >
>> >> curl_formadd(&post, &last,
>> >> CURLFORM_COPYNAME, "mydata",
>> >> CURLFORM_PTRCONTENTS, "test\0test",
>> >> CURLFORM_CONTENTSLENGTH, 9,
>> >> CURLFORM_END);
>> >>
>> >> -> 4 bytes are posted, but not 9
> >
> > I just built a test application using exactly this snippet. Worked exactly
> > like documented, and sent the 9 bytes fine:
> >
> > => Send data, 150 bytes (0x96)
> > 0000: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------

Thanks for your time. It seems like I'm hitting a bug in php on the
server side then, and there's nothing wrong with curl. What did you use
to created this dump? It would help me in debugging.

bye,
Till

-- 
Dipl.-Ing. Tillmann Steinbrecher        http://www.igd.fhg.de/~tsteinbr/
Cognitive Computing & Medical Imaging   Phone: +49 6151 155-485
Fraunhofer IGD, Fraunhoferstr. 5, D-64283 Darmstadt, Germany
Received on 2006-07-27