curl-users
curl --form problem
Date: Mon, 10 May 2004 09:49:11 +0200
Hi there,
I attempted many times to send a request using curl, with POST method, passing
as parameter a XML string; the parameter name is INPUT_XML.
I cannot receive the input parameter from the request, in the server-side
code.
I send a request with the following command line, according to the syntax that
came from the manual:
curl --cert ./BT05428_curl.pem --cacert /CA01000.pem --insecure \
--form "INPUT_XML=<somefile.xml" \
https://localhost:8443/SSLAuthentication/ServiceManager
but I cannot see the INPUT_XML parameter in the request.
I can test the address https://localhost:8443/SSLAuthentication/ServiceManager
using a browser (konqueror) with a simple form, and it works fine, so I think
that the problem is in curl.
I tempted also with the http clear text (no SSL) invocation, following the
hint that some users gave me:
curl --form "INPUT_XML=<somefile.xml"
http://localhost:8080/CWS/GPGAuthentication/ServiceManager
and I actually tested the it does NOT works; so I'm sure that the problem is
not in the protocol, but in curl. I also tested using -F instead of --form,
just to see if there was a problem with the command line option parsing, but
the problem remains the same.
Just to be sure I tested:
curl --data "INPUT_XML=sometext"
http://localhost:8080/CWS/GPGAuthentication/ServiceManager
And this time the system works fine.
At this point I'm pretty sure that there is a problem in curl or in the way
that I invoke it, so can you explain me if there is any error with this line:
curl --form "INPUT_XML=<somefile.xml" \
http://localhost:8080/CWS/GPGAuthentication/ServiceManager
I'm sure that the file is there (I made with absolute and relative path, it
doesn't changes anything).
Can someone help me?
Thanks, Luca Arzeni
-- Ing. Luca Arzeni Amadego S.R.L. Via Omodei 1, 20095 Cusano Milanino (MI) Tel. 02 6193672 Cell. 339 8350298 http://www.amadego.com mailto:l.arzeni_at_amadego.comReceived on 2004-05-10