All,
I have the following code:
use 5.010;
use LWP::UserAgent;
use URI::URL;
use LWP::Debug qw(+);
my $browser = LWP::UserAgent->new();
$browser->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .N
+ET CLR 1.1.4322)');
my $url = url 'http://www.investway.com';
my $resp = $browser->get($url);
open my $htmlFile, '>', 'c:\\temp\\temp5.html';
print $htmlFile $resp->{_content};
And here is the LWP::Debug output:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://www.investway.com/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 160 bytes
LWP::UserAgent::request: Simple response: Found
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET
http://www.investway.com/ErrorPage.aspx?aspxerrorpath=/Section.aspx
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 784 bytes
LWP::Protocol::collect: read 2242 bytes
LWP::UserAgent::request: Simple response: Internal Server Error
These errors only happen with this particular web-site (www.investway.com). It works just fine when I use just about any other web site. There's really not enough information put out by LWP::Debug for me to figure this out.
By the way, the temp5.html file produced by my code shows a web page with "Runtime Error" as its title. Just using Internet Explorer to connect to www.investway.com works fine and shows a normal web page. So, I figure the LWP::UserAgent is not sending something needed by this website.
Any help would be greatly appeciated.
Chuck