cURL / Mailing Lists / curl-users / Single Mail

curl-users

Fwd: Blank file upload changed between 7.28 and 7.29

From: ogondza <ogondza_at_gmail.com>
Date: Wed, 27 Feb 2013 10:26:15 +0100

Hi,

I observe this problem in both php module for curl as well as in the
command line tool.

I need to emulate browsers' behavior when sending file input that was left
blank (at least php on the server side seems to interpret it the same
way). For 7.28 a probably couple of earlier versions this worked just fine:

       curl -F "file_input_filed=@/dev/null;filename="

However, from 7.29 it gives "curl: (43) A libcurl function was given a bad
argument" and sends nothing. This one seems to do the trick:

       curl -F "file_input_filed=@;filename="

but it does not work in earlier versions of curl (curl: (26) couldn't open
file ""). Is there any way to do the same in both versions?

Plus, the old behavior seem to be used by other people as well.[1]

Thanks

[1] http://stackoverflow.com/a/6367949/2091470

-- 
oliver
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-27