[Wellington-pm] Problems with HTTPS through LWP.

Grant McLean grant at mclean.net.nz
Mon Jun 19 18:40:43 PDT 2006


On Tue, 2006-06-20 at 10:39 +1200, michael at diaspora.gen.nz wrote:
> Hi,
> 
> I've come across an interesting problem, and before filing a bug on
> rt.cpan.org, I thought I'd ask the list about it.
> 
> I have the following (minimal) program, which is giving me errors:
> 
>     #!/usr/bin/perl
>     use LWP::UserAgent;
>     use strict;
>     my $url = 'https://www.telstraclear.co.nz/usagemeter/index.cfm';
>     my $ua = LWP::UserAgent->new();
>     my $rq = HTTP::Request->new('GET');
>     $rq->url($url);
>     my $rp = $ua->request($rq);
> 
>     die if $rp->code() == 500;

I do get the same errors as you and yet the same code will happily
download pages from other SSL sites.  I note that the telstraclear site
is IIS but other IIS sites like kiwibank seem to be accessible.  Perhaps
it's something weird in the SSL negotiation phase

Interestingly, the code snippet in the synopsis of the Net::SSLeay
documentation does seem to work:

  use Net::SSLeay qw(get_https make_headers);

  my($page, $response, %reply_headers) = get_https(
    'www.telstraclear.co.nz', 
    443, 
    '/usagemeter/index.cfm',
    make_headers(
      'User-Agent' => 'Cryptozilla/5.0b1',
      'Referer'    => 'https://www.bacus.pt'
    )
  );

Cheers
Grant




More information about the Wellington-pm mailing list