curl-users
Submitting form data breaks on various occasions
Date: Mon, 24 Mar 2008 06:38:32 +0000 (UTC)
Hi,
I'm not sure whether this is related to me running cURL within Cygwin,
but I am experiencing some weird problems when trying to POST
multipart/form-data using cURL.
For one, I am not able to supply data as an HTML or XML string:
$ curl (url) -F "mydata=<b>Some Markup</b>"
This results in a curl error: "failed creating formpost data". Why?
Because of this, I tried to store this markup in a file instead, and pass
this file as the argument to -F:
$ curl (url) -F mydata=<./thefile.txt
Now I don't get this error anymore, but the temporary file cURL creates
for uploading (why does it create temporary files from my input file
anyway instead of reading directly from it?) is always 0 bytes, and no
data will arrive at the server. The same problem occurs when using
@./thefile.txt and also when omitting the ./ prefix.
Am I simply missing something, or does curl behave differently in a
Cygwin environment?
Received on 2008-03-24