curl-users
POST converted to GET on redirection
Date: Mon, 10 Sep 2007 10:33:58 +0000 (GMT)
Hi curl users,
I am trying to access a web service which is protected by serveral security mechanisms. Basically, I need to send a POST xml request to a known endpoint while providing user credentials (certificate, user/pass). Unfortunately, during the authentication process my request is forwarded to another location once (code 302) and curl follows the redirection but converts my POST to a GET request. From what I know, this is how curl is expected to behave : http://curl.haxx.se/mail/archive-2001-01/0115.html and http://sourceforge.net/tracker/?group_id=976&atid=100976&aid=229815&func=detail.
> curl.exe --verbose -k -E XXX.pem -L --cookie-jar cookies --cookie cookies -u XXX:XXX --header 'Content-Type: text/xml; charset=UTF-8' -d '@test.xml' https://XXX
A solution could be to take care manually of the redirection by extracting the "Location" url ...but I would prefer not to write HTTP specific code in my WS client. And even if I wanted to, because I am using a library (as many developers) for creating web services that relies on curl to handle HTTPS connections, I would have to modify this library and not my own code... From my point of view the best solution would be to create an option or a flag that would force curl to POST again at the redirected URL. As an end-end-user, I would just have to pass this argument to the curl via my web service library.
Thanks for your help or comments....
euphrate_ylb
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Received on 2007-09-10