cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Usage of Easy Perform with POST Data

From: Arthur <pylinuxian_at_gmail.com>
Date: Fri, 27 Jun 2008 22:55:43 +0000

You are probably lost in the middle of the application that manages the
security of this website. your best bet is to use some tool like : "
http://www.ieinspector.com/httpanalyzer/" to see whats really happening
under the hood, which page gives cookie & which one expects it , and more
importantly which script handles your posted data.
If i uderstood well, when you request the url without posting anything it
redirects you. but when you post something it does not, & your program
looses its logic because redirect count stays at 0. Well, I guess you will
only have to change this logic (because it is not working) ... to something
like parsing the page & identifying it by its content (like
<title>xxxx</title>).

On Fri, Jun 27, 2008 at 9:54 PM, Atul_Aggarwal <Atul_Aggarwal_at_satyam.com>
wrote:

> 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
>
>

-- 
"He who asks a question may be a fool for a few minutes. He who does not ask
may be a fool forever"

-------------------------------------------------------------------
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