[Buffalo-pm] LWP help request
jasonp at panix.com
Wed Jul 30 23:16:52 CDT 2003
Jesse L Farinacci <jlf27 at cse.Buffalo.EDU> writes:
> my $url = 'https://manage1.sprintpcs.com/Manage?target=MyCurrentUsage&action=current_usage';
> my $ua = LWP::UserAgent->new;
> my $req = HTTP::Request->new(GET => $url);
> $req->authorization_basic(PHONE_NBR, PASSWORD);
> my $res = $ua->request($req);
I think I *do* remember some problems getting basic authorization
working over HTTPS some years ago when I was working on a HotMail
harvester. Sadly I seem to have deleted that project.
> i've got the LWP with SSL properly configured, i've tested this out with
> other https pages and it's working fine.
I assume the other pages don't use basic authorization? Could you set
up a small test area to work with?
> i'm not sure if it is even possible for me to POST to the main page,
> then while still within that UserAgent to request the usage page ::
> perhaps the uname / pword authentication will have passed from the
> POST and remain within the context of the UA?? maybe i'm grasping
> at straws..
You *may* want to have a look at the WWW::Mechanize::Shell module from
CPAN. I've been toying with it for the last few hours and have been
having pretty good success, although... Well. Here's the problem:
henry at freezer:henry $ perl -MWWW::Mechanize::Shell -eshell
Module File::Modified not found. Automatic reloading disabled.
 Return to main menu page
 Chris Peat
 GSOC Home Page
Remember=<UNDEF> (checkbox) [*<UNDEF>|1]
(textbox)UserName>  nooks
(password)Password>  NotMyPassword
(checkbox)Remember>  1
For some reason trying to set the UserName parameter doesn't seem to
be sent to the server correctly. But this sounds like a pretty bad
failure of WWW::Mechanize::Shell. I'm checking the module is properly
installed now but I wonder if any list members have ideas?
Stay up-to-date on what I'm doing lately:
More information about the Buffalo-pm