M
mike
Hi,
The script I have below is used o access an internal website with https (so no proxy here).
use LWP::UserAgent;
use LWP:ebug qw(+);
#create User-agent
my $ua = LWP::UserAgent->new;
$ua->no_proxy("<internalsite>.se");
my $url = "http://<internalsite>.se/org.testng.eclipse/site.xml";
my $req = HTTP::Request->new(
GET => $url);
# send request
my $res = $ua->request($req);
# check the outcome
if ($res->is_success) {
print $res->decoded_content;
}
else {
print "Error: " . $res->status_line . "\n";
}
When I execute it I get the following error:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://<internalsite>.se/org.testng.eclipse/site.xml
LWP::UserAgent::_need_proxy: Not proxied
LWP:rotocol::http::request: ()
LWP:rotocol::collect: read 259 bytes
LWP::UserAgent::request: Simple response: Found
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET https://<internalsite>.se/org.testng.eclipse/site.xml
LWP::UserAgent::_need_proxy: Not proxied
LWP:rotocol::http::request: ()
LWP::UserAgent::request: Simple response: Internal Server Error
Error: 500 Can't connect to <internalsite>.se/:443 (Bad service '8080/')
Any ideas what the problem can be?
br,
//mike
The script I have below is used o access an internal website with https (so no proxy here).
use LWP::UserAgent;
use LWP:ebug qw(+);
#create User-agent
my $ua = LWP::UserAgent->new;
$ua->no_proxy("<internalsite>.se");
my $url = "http://<internalsite>.se/org.testng.eclipse/site.xml";
my $req = HTTP::Request->new(
GET => $url);
# send request
my $res = $ua->request($req);
# check the outcome
if ($res->is_success) {
print $res->decoded_content;
}
else {
print "Error: " . $res->status_line . "\n";
}
When I execute it I get the following error:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://<internalsite>.se/org.testng.eclipse/site.xml
LWP::UserAgent::_need_proxy: Not proxied
LWP:rotocol::http::request: ()
LWP:rotocol::collect: read 259 bytes
LWP::UserAgent::request: Simple response: Found
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET https://<internalsite>.se/org.testng.eclipse/site.xml
LWP::UserAgent::_need_proxy: Not proxied
LWP:rotocol::http::request: ()
LWP::UserAgent::request: Simple response: Internal Server Error
Error: 500 Can't connect to <internalsite>.se/:443 (Bad service '8080/')
Any ideas what the problem can be?
br,
//mike