use strict; use WWW::Mechanize; use WWW::Mechanize::FormFiller; my $mechanize = WWW::Mechanize->new( autocheck => 1 ); my $formfiller = WWW::Mechanize::FormFiller->new(); $mechanize->proxy(['http', 'ftp', 'https'], 'http://tant-a01\\santu:Xi +us12345678@naproxy.XXX.com:80'); $mechanize->get('http://www.redhat.com'); #$mechanize->get('https://www.redhat.com'); print $mechanize->status(); my $page = $mechanize->content; print $page; cpan> install IO::Socket::SSL Going to read '/root/.cpan/Metadata' Database was generated on Sat, 06 Mar 2010 22:36:41 GMT IO::Socket::SSL is up to date (1.32). + + cpan> install Crypt::SSLeay Crypt::SSLeay is up to date (0.57).

Above code works fine with the http link but when using with https it comes back with the below message.

"Error GETing https://www.redhat.com: Bad Request at test.pl line 9"

Any help/suggestions would be highly appreciated

Thanks Vishnu

In reply to Mechanize https proxy not working by vishnu787

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.