Dear Monks,

I had a web grabbing program (using LWP) successfully running on 3 environments previously.

The 3 environments are Test, Pre-Prod, and Prod.

However today the program on Pre-Prod begins to get '500' error when making its first GET to fetch the raw web page. (it fetches the web page so that to start the login process)

Then, I changed the request to be 'POST', but no luck...

So, I'm wondering if anything wrong, because the Test env (using proxy) and the Prod env (without proxy) are working good, but just the Pre-Prod...

I paste the code to make the simple requeste and also the detailed '500' response here:

 

Request

   200      my $res = $ua->request(POST $gLoginURL);
   201     
   202      if ( !$res->is_success ) {
   203          $self->{log}->die("ERROR:\t" . Dumper($res));
   204      }

 

BAD response

2014/09/24 10:34:30 CRITICAL: FATAL: ERROR:     $VAR1 = bless( {
                 '_content' => '500 Can\'t connect to www.xxxxxxxx.com:80 (Bad hostname \'www.xxxxxxxx.com\')
',
                 '_rc' => 500,
                 '_headers' => bless( {
                                        'client-warning' => 'Internal response',
                                        'client-date' => 'Wed, 24 Sep 2014 14:34:30 GMT',
                                        'content-type' => 'text/plain'
                                      }, 'HTTP::Headers' ),
                 '_msg' => 'Can\'t connect to www.xxxxxxxx.com:80 (Bad hostname \'www.xxxxxxxx.com\')',
                 '_request' => bless( {
                                        '_content' => '',
                                        '_uri' => bless( do{\(my $o = 'http://www.xxxxxxxx.com/Pages/profile.aspx')}, 'URI::http' ),
                                        '_headers' => bless( {
                                                               'user-agent' => 'libwww-perl/5.804',
                                                               'content-type' => 'application/x-www-form-urlencoded',
                                                               'content-length' => 0
                                                             }, 'HTTP::Headers' ),
                                        '_method' => 'POST'
                                      }, 'HTTP::Request' )
               }, 'HTTP::Response' );

 

Please, I pray for your help on getting this problem solved.

 

Thanks in advance


In reply to 500 error on a simple request by sylph001

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.