in reply to LWP Posting login/redirect
My First instinct is that the login page probably sets a cookie once you've been authenticated. If this is the case you should make sure you have added a cookie jar to your user agent, otherwise subsequent requests will not include the cookie (which might make the site think you are not logged in). My other piece of advice would be to make sure the "POST" is in the requests_redirectable list. This will tell the user agent to automatically follow redirects even for POST requests (not the default behavior).See the below example:
$ua = LWP::UserAgent->new; push @{ $ua->requests_redirectable }, 'POST'; $ua->cookie_jar(HTTP::Cookies->new(file => "C:/temp/lwpcookies.txt", a +utosave => 1));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: LWP Posting login/redirect
by Anonymous Monk on Oct 26, 2004 at 19:44 UTC | |
|
Re^2: LWP Posting login/redirect
by Anonymous Monk on Oct 26, 2004 at 19:38 UTC |