Need help on LWP::UserAgent module!

2000-11-14 Thread spring
I use a form to let the user input a URL, when the user input a url and click the "Test URL" button, a window popup and tell the user whether the URL is valid. I write a OnClick event handle for the Test Button to open the new window and transfer a param url to the TestURL.pl file. My program

Re: Need help on LWP::UserAgent module!

2000-11-14 Thread Bill Moseley
At 05:06 PM 11/14/00 +0800, spring wrote: My program works fine when test on most URL, but with some, I always get a error status such as 500, 403,etc, even when the url can be visited correctlly in browser. [snip] my $req = HTTP::Request-new(HEAD = $url); Many servers are busted and will

Re: Need help on LWP::UserAgent module!

2000-11-14 Thread Gisle Aas
Bill Moseley [EMAIL PROTECTED] writes: Many servers are busted and will return a 500 error on a HEAD request. I remember Cold Fusion being one. Maybe there's a better way, but this is what I do to validate a URL: $req = HTTP::Request-new( GET = $url ); $ua-timeout(

Re: Need help on LWP::UserAgent module!

2000-11-14 Thread Bill Moseley
At 03:36 PM 11/14/00 -0800, Gisle Aas wrote: Maybe there's a better way, but this is what I do to validate a URL: $req = HTTP::Request-new( GET = $url ); $ua-timeout( $LWP_GET_WAIT || 30 ); $res = $ua-simple_request( $req, sub { die }, 100 ); The same effect can also be

Re: Need help on LWP::UserAgent module!

2000-11-14 Thread Gisle Aas
Bill Moseley [EMAIL PROTECTED] writes: At 03:36 PM 11/14/00 -0800, Gisle Aas wrote: Maybe there's a better way, but this is what I do to validate a URL: $req = HTTP::Request-new( GET = $url ); $ua-timeout( $LWP_GET_WAIT || 30 ); $res = $ua-simple_request( $req, sub { die