in reply to Re^4: Can't make WWW::Mechanize work through proxy programmatically
in thread Can't make WWW::Mechanize work through proxy programmatically

Like I said, unlikely story

#!/usr/bin/perl -- use strict; use warnings; use LWP; use WWW::Mechanize; for my $class ( qw/ LWP::UserAgent WWW::Mechanize /){ my $ua = $class->new; warn "$ua\n"; $ua->show_progress( 1 ); $ua->proxy( [ qw{ http https } ] => q{http://127.6.6.6} ); $ua->get( q{http://example.com} ); } __END__ LWP::UserAgent=HASH(0x99b58c) ** GET http://example.com ==> 500 Can't connect to 127.6.6.6:80 (No co +nnection could be made because the target machine actively refused it +.) (1s) WWW::Mechanize=HASH(0xeb8714) ** GET http://example.com ==> 500 Can't connect to 127.6.6.6:80 (No co +nnection could be made because the target machine actively refused it +.) (1s) Error GETing http://example.com: Can't connect to 127.6.6.6:80 (No con +nection could be made because the target machine actively refused it. +) at lwp-mech-proxy.pl line 14.

Thats both LWP and Mechanize accepting the proxy setting and trying to connect

  • Comment on Re^5: Can't make WWW::Mechanize work through proxy programmatically
  • Download Code