curl-library
Re: How to POST binary data with libcurl?
Date: Thu, 27 Jul 2006 20:11:57 +0200
Hi,
>> I can now confirm that; I was running into a bug in PHP which was
>> already
>> reported 5 years ago (http://bugs.php.net/bug.php?id=14321) - Daniel,
>> you
>> were also apparently involved back then :); but the bug STILL isn't
>> fixed in
>> the very latest PHP release.
>
> I've said it before and I can say it again: the PHP multipart formpost
> receiver is stupid. It was back then and it obviously still is. The
> current
> libcurl code in fact still inhibits the sending of a
> Content-Transfer-Encoding: header just because of its stupidness.
But there's hope. I filed a new PHP bug report today, and the bug is fixed in CVS. I guess we'll have to wait for PHP6 until a fixed released version is available, but that's better than nothing.
As a workaround, sending as file (CURLFORM_BUFFER/CURLFORM_BUFFERPTR CURLFORM_BUFFERLENGTH) works; though it causes the data to be unnecessarily stored in a temporary file on the server.
Thanks again for your help!
bye,
Till
Received on 2006-07-27