Here is the updated code and same error.

#!/usr/bin/perl use strict; BEGIN { $ENV{HTTPS_PROXY} = 'my_proxy:port'; }; use WWW::Mechanize; use Crypt::SSLeay; my $mech = WWW::Mechanize->new(autocheck => 1,noproxy => 1); $mech->cookie_jar(HTTP::Cookies->new); $mech->agent('Mozilla/5.0'); $mech->proxy(['https', 'http', 'ftp'], 'my_proxy:port'); # http $mech->get("http://www.google.com"); my $test = $mech->forms(); # https $mech->get("https://www.irctc.co.in") ; die $mech->response->status_line unless $mech->success; my $test = $mech->forms();
<error> DB<1> r Error GETing https://www.irctc.co.in: Bad Request at pnr_2.perl line 28 at C:/strawberry/perl/lib/WWW/Mechanize.pm line 2747 WWW::Mechanize::_die('Error ', 'GET', 'ing ', 'URI::https=SCALAR(0x19ba23c)', ': ', 'Bad Request') called at C:/strawberry /perl/lib/WWW/Mechanize.pm line 2734 WWW::Mechanize::die('WWW::Mechanize=HASH(0x15ddcf4)', 'Error ', 'GET', 'ing ', 'URI::https=SCALAR(0x19ba23c)', ': ', 'Bad Request') called at C:/strawberry/perl/lib/WWW/Mechanize.pm line 2383 WWW::Mechanize::_update_page('WWW::Mechanize=HASH(0x15ddcf4)', 'HTTP::Request=HASH(0x19ba5dc)', 'HTTP::Response=HASH(0x19b a39c)') called at C:/strawberry/perl/lib/WWW/Mechanize.pm line 2213 WWW::Mechanize::request('WWW::Mechanize=HASH(0x15ddcf4)', 'HTTP::Request=HASH(0x19ba5dc)') called at C:/strawberry/perl/ve ndor/lib/LWP/UserAgent.pm line 389 LWP::UserAgent::get('WWW::Mechanize=HASH(0x15ddcf4)', 'https://www.irctc.co.in') called at C:/strawberry/perl/lib/WWW/Mech anize.pm line 407 WWW::Mechanize::get('WWW::Mechanize=HASH(0x15ddcf4)', 'https://www.irctc.co.in') called at pnr_2.perl line 28 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1> </error> </error>

In reply to Re^4: HTTPS connection problems WWW::Mechanize , LWP by vishy_acts
in thread HTTPS connection problems WWW::Mechanize , LWP by vishy_acts

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.