cURL / Mailing Lists / curl-users / Single Mail

curl-users

Usage of Easy Perform with POST Data

From: Atul_Aggarwal <Atul_Aggarwal_at_satyam.com>
Date: Sat, 28 Jun 2008 03:24:02 +0530

Hi All,

 

I am using libcurl for one of my projects in which we are using the
"easy perform" operation.

 

As a part of our flow we need to connect to an URL which is LDAP
authenticated. Authentication is controlled using a Cookie.

 

When I try connecting to the ACTUAL URL for the first time, since Cookie
is not there, it redirects me to the LOGIN URL and I was using the logic
of checking the "Redirect Count" to see if I am getting redirected it
means I am not authenticated and then I was explicitly making a second
call to the LOGIN URL with the required details.

 

When I try the same thing by using POST DATA with the call to the Actual
URL, somehow the link is not getting redirected and I am getting
"redirect count as "0" and my code assumes that it got authenticated.
The message I could see is "This page is being used to hold your POST
DATA. It should get redirected automatically , otherwise click redirect
button."

Is there a way I can by pass that setting of holding data or can I can
automatically call the redirect button?

 

Please help me know how to check for the condition where I can check
that the call to actual URL is successful or not. I also tried using
"Response Code" value for 302 (failure case) and 200(success case). But
in above scenario it always returns me 200.

 

Is there any other code/option that I need to check to address this.

 

Please help as this is critical for me and I am stuck only at this
point.

 

Note: You can consider that in SUCCESS scenario for ACTUAL URL, we need
to pass some POST Data and it returns a static page and will never
redirect.

 

Thanks

Atul

 

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-06-28