https / proxy problem
am 11.01.2006 16:59:03 von LarryI have a script on Windows which uses LWP to make a simple GET request
through a proxy:
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $url = "https://mysite.com";
my $ua = LWP::UserAgent->new;
$ua->proxy(['http', 'https'] => 'http://myproxy.org:80');
my $response = $ua->get( $url );
$response->is_success or
die "Failed to GET '$url': ", $response->status_line;
print $response->as_string, "\n";
I also have Crypt::SSLeay installed so that I can access https sites.
When I try to run the script as above, it prints some HTTP headers and
an HTML-formatted error message from the firewall server which says
"Scheme not supported".
However:
-If I change $url to point to a an http site, the script will
successfully fetch the page, and
- If I change $url to point to an internal https server and comment out
the proxy setting line, the script will successfully get the internal
page.
I checked my proxy settinng in Internet Explorer and both http and
https are set to myproxy.org on port 80 (server name changed to protect
privacy)
Anybody know why I can't reach remote https sites?