The autosave option only saves the cookie file during destruction.
You can see the page, because you send the username/password.
The reason you're having problems the 2nd time, is because when you login, you're issued a cookie, which you simply discard.
Since you login via Login.cfm, and your 2nd request is to Page.cfm, you must send the cookie you were given by Login.cfm.
That's how cookie based authentication works. You send your credentials, and get issued a cookie, which you use as credentials istead.
Now please go read the HTTP::Cookies documentation like I suggested (you could've saved yourself a day or two)
update:
I was reviewing some of my nodes, and then I noticed $ua->cookie_jar ( you know, it would've be nice if somebody pointed this out to me). Turning to the documentation would've still been helpfull though (you'd have known the following, and could've dismissed my comments quickly ;)
$ua->cookie_jar([$cookies])
Get/set the HTTP::Cookies object to use. The default is to have no cookie_jar, i.e. never automatically add ``Cookie'' headers to the requests.
Look ma', I'm on CPAN.
** The Third rule of perl club is a statement of fact: pod is sexy.
In reply to Re: login just fine
by PodMaster
in thread LWP and HTML 302 Error
by inblosam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |