CURLFORM_STREAM: acknowledge CURLFORM_FILENAME
authorDaniel Stenberg <daniel@haxx.se>
Fri, 17 Jun 2011 20:21:36 +0000 (22:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 17 Jun 2011 20:23:42 +0000 (22:23 +0200)
commitf851f768578dc096c561d57ba07ffd1004d504c0
treee8acc4af7c02b32b038b425c1185dbb86cec11af
parent0126b4a959c43933072a6b9549a7bd45bc606cb0
CURLFORM_STREAM: acknowledge CURLFORM_FILENAME

The CURLFORM_STREAM is documented to only insert a file name (and thus
look like a file upload) in the part if CURLFORM_FILENAME is set, but in
reality it always inserted a filename="" and if CURLFORM_FILENAME wasn't
set, it would insert insert rubbish (or possibly crash).

This is now fixed to work as documented, and test 554 has been extended
to verify this.

Reported by: Sascha Swiercy
Bug: http://curl.haxx.se/mail/lib-2011-06/0070.html
lib/formdata.c
tests/data/test554
tests/libtest/lib554.c