in reply to Multiple Step Login in Perl

In your first request, you're not sending the SOAPAction header. Also, most likely, if you need to speak SOAP, something like SOAP::Lite is better than constructing your SOAP requests manually.

In your second request, you are doing a very weird think when setting the headers via the ->default_headers method. Don't do that, but construct your request properly through HTTP::Request::Common instead.

I recommend doing a proper compare between what your browser sends and what your script sends, by using Wireshark and/or LWP::Debug.

Replies are listed 'Best First'.
Re^2: Multiple Step Login in Perl
by sylph001 (Sexton) on May 20, 2014 at 18:37 UTC
    Hi Corion,

    It seems I could login now by changing the way it does the POST, just like you said!

    Following the second point you mentioned, I changed to use a formal HTTP::Request::Common method to do the post with all the form parameters I could get, and it eventually become able to get the next web page!

    The SOAP::Lite does look more professional for dealing with SOAP requests. It is appearing to me, but I guess I need bit more time to learn how to put into use.

    Thank you very much for inspecting on each of the suspicious points from my program!


    Have a nice day