How to tell WWW::Mechanize to work with HTTPS proxy? I have this code:
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/");
and below is result I have:
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:80 +80
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

In reply to WWW::Mechanize and HTTPS proxy by Gangabass

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.