cURL / Mailing Lists / curl-users / Single Mail


pb with http post request (form) and attached file

From: Frédéric Plé <>
Date: Wed, 24 Oct 2007 14:45:07 +0200


I am running curl on a linux debian Etch :
# curl -V
curl 7.15.5 (i486-pc-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8c zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

I am trying to batch a form post with an attached file but it does not work
when the filename contains silly characters like space and comma.

Here is the command line I use :
curl -s -o /dev/null -b ./cookie.txt -F folderid=7 -F
'userfile=@/tmp/4153/29 E-MAILING, FAX-MAILING ET MAILING.DOC' -F
expires=false -F sequence=1 'http://localhost/form-script.php'

When I run the curl command with strace, I have this error :
open("/tmp/4153/29 E-MAILING", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such
file or directory)

As you can see, the filename is cut when encounters comma.

Any clue ?


Received on 2007-10-24