On Mon, 13 Jun 2011, Sascha Swiercy wrote:

I'd like to use the CURLFORM_STREAM option in curl_formadd for adding normal parts, but it seems that using CURLFORM_STREAM will always make it a file upload. The documentation for curl_formadd states, that when using CURLFORM_STREAM, also CURLFORM_FILENAME must be set to let the part become a file upload. But no matter whether I set the filename option or not, the part is always treated as a file upload. If I omit the filename, it seems to read from undefined memory which results in a random character sequence as filename. I'm using libcurl version 7.21.6.

What can I do?

Clearly this is a bug. We can either consider this to be a documentation bug or a code bug. I think I prefer to support the feature as documented so I say we claim it to be a code bug.

A decent approach to get this fixed would be to

 a) write up a unit test that verifies the existing functionality
 b) make the unit test also verify the documented functionalty
 c) write the patch to make step (b) work
 d) submit patch(es) for the relevant work to this mailing list

Are you willing to take a shot at it?

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to