cURL / Mailing Lists / curl-users / Single Mail


Fwd: Blank file upload changed between 7.28 and 7.29

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


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]



List admin:
Received on 2013-02-27