http://qs321.pair.com?node_id=860319

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Here's my code
#!/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";
It returns
Error at https://www.redhat.com 400 Bad Request Aborting at test.pl line 30.
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 it