Pazitiff has asked for the wisdom of the Perl Monks concerning the following question:
Hello to all! I am using LWP to get simple content (http) via local proxy, but when I get content with via https protocol I get error: https://kuix.de/: Can't connect to kuix.de:443 (10051)
My script
use strict; use warnings; use feature qw (say switch); use LWP; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; $ENV{HTTPS_DEBUG} = 1; #my $url = 'http://google.com'; my $url = 'https://kuix.de/'; my $ua = LWP::UserAgent->new(); $ua->agent('User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18 +.0) Gecko/20100101 Firefox/18.0'); $ua->show_progress('true'); $ua->ssl_opts ( verify_hostname => '0', SSL_ca_file => 'CA.crt'); + $ua->proxy( ['http'], 'http://user:pass@host:port' ); my $req = HTTP::Request->new( 'GET' => $url ); my $res = $ua->request($req); $res->is_success or die "$url: ", $res->message, "\n"; say $res->content;
Please help me! Sorry but I am new perl user
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP https proxy trouble
by Corion (Patriarch) on Apr 11, 2013 at 11:46 UTC | |
by Pazitiff (Novice) on Apr 11, 2013 at 12:15 UTC | |
by Pazitiff (Novice) on Apr 11, 2013 at 11:55 UTC | |
|
Re: LWP https proxy trouble
by vsespb (Chaplain) on Apr 11, 2013 at 12:48 UTC | |
by Pazitiff (Novice) on Apr 12, 2013 at 04:17 UTC | |
|
Re: LWP https proxy trouble
by Anonymous Monk on Jul 22, 2013 at 12:09 UTC | |
by Anonymous Monk on Oct 16, 2013 at 15:50 UTC | |
by Anonymous Monk on Oct 16, 2013 at 15:52 UTC |