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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.