On Monday, Nov 10, 2003, at 13:31 US/Pacific, Rajesh Dorairajan wrote: [..]
I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not[..]
yet implemented error when I connect to a web-server using the User-Agent.
Oye, excuse me if I do a 'homer simpson' here.
dooph!
a 501 series error should be coming back from the web-server, yes? So the problem is not with your code, but with the site you went to, and/or your network topology.
You might want to try against some other site.
I took your basic demo code and ran it as
call_me('http://www.wetware.com', 80);
where the call_me() is:
sub call_me { my ( $Host, $Port ) = @_; my $url = "$Host:$Port";
my $ua = LWP::UserAgent->new(env_proxy => 0, keep_alive => 0, timeout => 30, );
my $response = $ua->get( $url );
if ($response->is_success) { #print $response->as_string ; print "Your Request succeded to \n\t$url\n"; } else { print $response->error_as_HTML if ($response->is_error); print "Your Request Failed\n"; } }
and it works just fine.
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]