What everyone seems to be missing is the 'refresh' directive that Jack said was being returned after he successfully completes the login. If I understood what he's doing correctly, it was something like this:
(1) send login request (2) send request for desired page within site What I think he needs to do: (1) send login request (2) parse response to find the 'refresh' url that was returned in response to the login request - from the example he sent earlier, it appeared to have some session information in this URL (3) send a GET request for the URL found in (2) (4) send request for desired page within site If that doesn't work, take a look at the response given to the request in (3) to determine if some other action needs to be taken at this point. By the way, as far as I can determine, this problem has absolutely nothing to do with https, so the subject line is a little misleading. It just so happens that this site uses ssl, but that doesn't appear to be creating this problem. --- David Carter [EMAIL PROTECTED] > >-----Original Message----- > >From: (William) Wenjie Wang [mailto:[EMAIL PROTECTED] > >Sent: Thursday, May 29, 2003 2:34 AM > >To: Jack Yang; John J Lee; [EMAIL PROTECTED] > >Subject: RE: https problem > > > >Hi Jack, > > > >I've done something like following code snip and it works fine for me. > >Hope > >it'll help: > > > >---------------------------8<------------------------------------ > >my $myUserAgent = LWP::UserAgent->new(keep_active => 2); > >$myUserAgent->agent("Mozilla/4.0 (compatible; MSIE 6.0; Win32)"); > >$myUserAgent->cookie_jar(HTTP::Cookies->new(autosave => 1)); > > > > > ># download login form > >..... > ># parse and fill out form data > >my $LoginForm = HTML::Form->parse($myResponse->content, > >$myResponse->base()); > >$LoginForm ->value('username' => $username); > >$LoginForm ->value('password' => $password); > >.... > ># submit form > >$myResponse = $myUserAgent->request($myForm->click() ); > > > ># Get the page you want if login was sucess. > >my $myResponse = $myUserAgent->request(HTTP::Request->new($Verb, > >$PageURL)); > > > >---------------------------8<------------------------------------ > > > > > >Regards, > >WWang > >
