oalvi has asked for the wisdom of the Perl Monks concerning the following question:
# !C:\Perl\bin use strict; use warnings; use LWP::UserAgent; #my $wsr = LWP::UserAgent -> new; #$wsr -> timeout( 20 ); my $url = shift or die "URL expected\n"; my $useragent = LWP::UserAgent->new; $useragent->proxy(['http', 'ftp','https'], 'http://192.168.5.5:8080/') +; $useragent -> timeout( 20 ); my $request = HTTP::Request->new( HEAD => $url ); my $response = $useragent->request($request); print $response->status_line, "\n";
It works fine for most URLs, http or https. However for some URLs, which function fine from the explorer, I get errors as follows:
https://elmag.elm.com.sa
500 Internal Server Error
https://www.etv.com.sa
500 Internal Server Error
Other https addresses work fine, for example
https://eserve.com.sa
200 OK
Looking forward to your support and assistance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP - 500 Internal Error
by ig (Vicar) on Sep 01, 2009 at 14:18 UTC | |
|
Re: LWP - 500 Internal Error
by Anonymous Monk on Sep 01, 2009 at 12:29 UTC | |
by oalvi (Novice) on Sep 01, 2009 at 13:25 UTC | |
by Anonymous Monk on Sep 01, 2009 at 13:39 UTC | |
by Anonymous Monk on Sep 01, 2009 at 19:35 UTC | |
by Anonymous Monk on Sep 01, 2009 at 21:41 UTC | |
| |
|
Re: LWP - 500 Internal Error
by Anonymous Monk on Jul 07, 2010 at 08:33 UTC |