in reply to Problem with fetching contents of page after login form submission using POST: LWP::UserAgent and WWW::Mechanize

Look at what goes on when you do the same via the browser, for example by using Wireshark or Mozilla Live HTTP Headers. Maybe it's a Javascript redirect, or there is an error message somewhere in the page that you're missing or something else.

  • Comment on Re: Problem with fetching contents of page after login form submission using POST: LWP::UserAgent and WWW::Mechanize

Replies are listed 'Best First'.
Re^2: Problem with fetching contents of page after login form submission using POST: LWP::UserAgent and WWW::Mechanize
by ajay.awachar (Acolyte) on Mar 14, 2010 at 20:51 UTC

    Thanks Corion.

    After observing request through Mozilla HTTP Live Headers I observed that it was causing failure because URL has an internal redirect. After making necessary changes to the URL, it worked perfectly fine for me. Your advise really helped me to resolve the issue.

    Thanks,

    Ajay