perlquestion
Gangabass
How to tell WWW::Mechanize to work with HTTPS proxy?
I have this code:
<c>
use WWW::Mechanize;
print "WWW::Mechanize: ", $WWW::Mechanize::VERSION, "\n";
print "LWP : ", $LWP::UserAgent::VERSION, "\n";
my $mech = WWW::Mechanize->new();
$mech->proxy( [ 'http', 'https' ], "https://204.228.129.46:8080/" );
$mech->add_handler("request_send", sub { shift->dump; return });
$mech->add_handler("response_done", sub { shift->dump; return });
$mech->get("http://people.iu.edu/");
</c>
and below is result I have:
<c>
WWW::Mechanize: 1.73
LWP : 6.06
GET http://people.iu.edu/
Accept-Encoding: gzip
User-Agent: WWW-Mechanize/1.73
(no content)
500 Can't connect to 204.228.129.46:8080
Content-Type: text/plain
Client-Date: Sat, 31 May 2014 02:26:15 GMT
Client-Warning: Internal response
Can't connect to 204.228.129.46:8080\n
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown error SSL wants a read first at c:/Perl/site/lib/LWP/Protocol/http.pm line 41.\n
Error GETing http://people.iu.edu/: Can't connect to 204.228.129.46:8080
</c>
If the proxy is HTTP based I have no errors...t connect to 204.228.129.46:8080
Content-Type: text/plain
Client-Date: Sat, 31 May 2014 02:26:15 GMT
Client-Warning: Internal response
Can