http://qs321.pair.com?node_id=1101820

sylph001 has asked for the wisdom of the Perl Monks concerning the following question:

 

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