[Wellington-pm] Problems with HTTPS through LWP.
Srdjan
srdjan at catalyst.net.nz
Mon Jun 19 16:48:41 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm out for lunch, but what's the aoutput of respone->as_string? 500 is client
assigned code, ie not the response from server.
I bet it's a timeout...
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'm using the Debian unstable packages of IO::Socket::SSL, and
> libwww-perl.
>
> So far I've traced this down to a call to sysread on an IO::Socket::SSL
> object returning undef rather than 0 bytes (see my_read in
> Net::HTTP::Methods, which calls IO::Socket::SSL::sysread, which in turn
> calls Net::SSLeay::read, which is XS, and I don't know how to debug),
> but I can't figure out why it's doing it.
>
> Furthermore, sometimes lwp-request of the same URL will work!
> (The 500 is definitely not authentic; it's a library problem.
> wget -O- $url will always return a result.) Using a different URL
> (eg https://diaspora.gen.nz/) works fine.
>
> Can anyone shed any light on this?
>
> -- michael
> _______________________________________________
> Wellington-pm mailing list
> Wellington-pm at pm.org
> http://mail.pm.org/mailman/listinfo/wellington-pm
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFElzfZZtcHxCitRpgRAgX3AKCcZuXi0B2I/j6M2zUf20iOV+mRXwCgtkyn
iWjSFUAKGrluYW7+lAwkIh0=
=odG5
-----END PGP SIGNATURE-----
More information about the Wellington-pm
mailing list