@EXPORT = qw(check_url);
}
+# Prototypes
+sub check_http_url($$$$);
+sub check_ftp_dir_entry($$);
+sub check_ftp_url($$$$);
+sub check_unknown_url($$$$);
+sub check_url($);
+################
+
sub check_http_url($$$$)
{
use Net::HTTP;
}
}
#print " Trying to use GET => \"$getp\"";
- $s->write_request(GET => $getp, 'User-Agent' => "Mozilla/5.0");
+ $s->write_request(GET => $getp, 'User-Agent' => "Mozilla/6.0");
my($code, $mess, %h) = $s->read_response_headers;
# Try to read something
my $found2 = 0;
for my $f ( @{$rEntries}) {
#print "Entry: $path $f\n";
- my ($res1,$isdir) = &check_ftp_dir_entry($file,$f);
+ my ($res1,$isdir) = check_ftp_dir_entry($file,$f);
if ($res1 == 1) {
$found = 1;
last;
return 2;
}
if ($protocol =~ /^https?$/) {
- return &check_http_url($protocol, $host, $path, $file);
+ return check_http_url($protocol, $host, $path, $file);
}
elsif ($protocol eq "ftp") {
my $message;
- ($res, $message) = &check_ftp_url($protocol, $host, $path, $file);
+ ($res, $message) = check_ftp_url($protocol, $host, $path, $file);
return $res;
}
else {
# it never should reach this point
print " What protocol is '$protocol'?";
- $res = &check_unknown_url($protocol, $host, $path, $file);
+ $res = check_unknown_url($protocol, $host, $path, $file);
return $res;
}
}