Hi,
I'm having the following problem. I know it's not a configuration
problem because the same machine can access Wikipedia using Lynx.
I'm trying to access Wikipedia using the Perl module LWP::UserAgent:
perl -e 'use LWP::UserAgent; use HTTP::Request;
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new (GET =>
"http://en.wikipedia.org/");
my $response = $ua->request ($request);
print $response->content;
'
The response I get is an HTML document which I've plaintexted here for
your viewing pleasure:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL:
http://en.wikipedia.org/
The following error was encountered:
* Access Denied.
Access control configuration prevents your request from
being allowed at this time. Please contact your service provider
if you feel this is incorrect.
Your cache administrator is webmaster.
Generated Mon, 09 Feb 2004 22:27:15 GMT by
wikipedia.org
(squid/2.5.STABLE4)
Looks like the same error message like the one I get on
test.wikipedia.org, except that this one only occurs when I use
LWP::UserAgent.
Any ideas?
Thanks,
Timwi