Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Here's my code
It returns#!/path/to/perl use strict; use LWP::UserAgent; use HTTP::Request::Common; use Crypt::SSLeay; $ENV{HTTPS_PROXY} = 'http://proxy:8080/'; $ENV{HTTPS_DEBUG} = 1; my $myurl = "https://www.redhat.com"; my $ua = new LWP::UserAgent; $ua->cookie_jar( {} ); $ua->protocols_allowed( [ 'http','https'] ); $ua->proxy(['http', 'https'], 'http://proxy:8080/'); my $page = $ua->get($myurl); die "Error $myurl\n ", $page->status_line, "\n Aborting" unless $page->is_success; print "Success", $page1->content_type, " document!\n";
Apparently, Its a bug: http://rt.cpan.org/Public/Bug/Display.html?id=1894 The workaround doesn't work for me. The proxy connection fails with itError at https://www.redhat.com 400 Bad Request Aborting at test.pl line 30.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LWP::Useragent GET fails with https
by wazoox (Prior) on Sep 16, 2010 at 10:42 UTC | |
by Anonymous Monk on Oct 18, 2011 at 15:33 UTC | |
by wazoox (Prior) on Oct 18, 2011 at 16:49 UTC | |
Re: LWP::Useragent GET fails with https
by zentara (Archbishop) on Sep 16, 2010 at 10:24 UTC | |
Re: LWP::Useragent GET fails with https
by danny0085 (Sexton) on Sep 20, 2012 at 15:15 UTC |
Back to
Seekers of Perl Wisdom