cURL / Mailing Lists / curl-users / Single Mail

curl-users

Difficulties with --data option

From: Yves PETRONIN <y.petronin_at_wanadoo.fr>
Date: Sat, 6 Mar 2010 12:25:50 +0100

I have been trying to use curl on a commercial web site where I have
a account, in order to update data related to my pictures.
While I have finally been succesful login to the web page and
updating most of the fields of the form, there are a few fields I
have been unable to update.
I have tried to understand the problem with Mozilla and the live
http header options, but without success.
This is an excerpt of a live http header record of a sucessful update:

-----------------------------168072824752491622650073
Content-Disposition: form-data; name="caption"

Summer storm
-----------------------------168072824752491622650073
Content-Disposition: form-data; name="copyright_statement"

Copyright Yves Petronin 2010
-----------------------------168072824752491622650073
Content-Disposition: form-data; name="ColValue.exposure%5fdate.month"

July
-----------------------------168072824752491622650073
Content-Disposition: form-data; name="ColValue.exposure%5fdate.day"

14
-----------------------------168072824752491622650073
Content-Disposition: form-data; name="ColValue.exposure%5fdate.year"

1970

The field "ColValue.exposure%5fdate.month" is a field where the month
can be choosed from a list, but there is another similar list in the
form, and I have updated successfully.

This is the curl command that I have used:

  --data "caption=Summer%20storm&copyright_statement=Copyright%20Yves%
20Petronin%202010&ColValue.exposure%
5fdate.month=July&ColValue.exposure%5fdate.day=23&ColValue.exposure%
5fdate.year=1970" url_of_page_to_update

While the 2 first fields (and some others not shown here) are updated
correctly, the fields "ColValue.exposure%5fdate.month",
"ColValue.exposure%5fdate.day", and "ColValue.exposure%5fdate.year"
fail to update with the curl command. I have suspected an url
encoding problem, and tried a few things, but nothing worked..
Any clue form the experts?

Thanks

-------------------------------------------------------------------
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 2010-03-06