in reply to GD and LWP giving 500 errors
im not sure why GD is involved, but for the calls using LWP::UserAgent i have a few suggestions. Lets assume you code looks like
have you inspected $request->content and $request->status_line for further info likemy $ua = new LWP::UserAgent(); my $req = new HTTP::Request (GET => $uri); my $request = $ua->request ($req);
That may help you identify what is going on.500 Can't connect to no.such.server.in.my.lan:80 (Bad hostname)
ssl problems can also case a 500. if you change the line to
and it starts working it means you probably have outdated certificates. rather than to continue to skip ssl verification there are modules to update. Mozilla::CA IO::Socket::SSL Net::SSLeay come to mind.my $ua=LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 });
if those dont seem to identify the problem add this
That will dump the entire request hash, and inspecting it may provide further insightUse Data::Dumper; print Dumper ($request);
one more thought. There may be some sort of blocking base on the agent. If you change the line to
and it starts working someone is filtering lwp. another agent you could try is something likemy $ua = new LWP::UserAgent(agent =>"myagent");
my $ua = new LWP::UserAgent(agent =>"Mozilla/5.0 (Windows NT 5.1; rv +:51.0) Gecko/20100101 Firefox/51.0");
|
|---|