title: Why does LWP::UserAgent GET request fail with HTTPS?
body: <p>Here's my code</p>
  
  <pre><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-&gt;cookie_jar( {} ); 
  $ua-&gt;protocols_allowed( [ 'http','https'] );
  $ua-&gt;proxy(['http', 'https'], 'http://proxy:8080/');
  
  my $page = $ua-&gt;get($myurl);
  
  die "Error $myurl\n ", $page-&gt;status_line, "\n Aborting" 
  unless $page-&gt;is_success; 
  print "Success", $page1-&gt;content_type, " document!\n"; 
  </code></pre>
  
  <p>It returns</p>
  
  <pre><code>Error at https://www.redhat.com
  400 Bad Request
  Aborting at test.pl line 30.
  </code></pre>
  
  <p>what's wrong?</p>
  
  <p>Edit:</p>
  
  <p>Apparently, Its a <a href="http://rt.cpan.org/Public/Bug/Display.html?id=1894" rel="nofollow noreferrer">bug</a>. But the workaround doesn't work for me.</p>