cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to send a form field value that begins with '@'?

From: David Houlder <david.houlder_at_anu.edu.au>
Date: Sun, 06 Mar 2005 21:05:05 +1100

Daniel Stenberg wrote:

>>> > curl --form-string name=@string http://somewhere.org
>>> > curl --form-file name=filename http://somewhere.org
>>

>
> Anyone up to writing a patch for this?

I'll have a stab at it later this week.

> No, that's an entirely different kind of form post and that is made with
> -d/--data. There's just no "x-www-form-urlencoded" type with --form
> posts unless you explicitly force the content-type to be that (which
> would be nothing but odd).

OK. I think I was led astray by
http://au2.php.net/manual/en/function.curl-setopt.php
which seems to indicate that in php,
curl_setopt($ch, CURLOPT_POSTFIELDS, $data)
only does a multipart/form-data post if you use the '@file' feature. I
assumed that behaviour was built into curl, but it must be just a php-ism.

Cheers
David.

-- 
David Houlder
61 Sherbrooke St
AINSLIE ACT 2602
02 6248 7463 (h)
02 6125 0578 (w)
david.houlder_at_anu.edu.au
http://davidhoulder.com
Received on 2005-03-06