]> git.lyx.org Git - lyx.git/blobdiff - development/checkurls/CheckURL.pm
* layouttranslations.review - remove dupes
[lyx.git] / development / checkurls / CheckURL.pm
index 339147a25b8152abbad83eff056ad1a4d49348e0..8403c5dac392651499e29abe3e3546ad9137d959 100755 (executable)
@@ -20,6 +20,14 @@ BEGIN {
   @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;
@@ -55,7 +63,7 @@ sub check_http_url($$$$)
     }
   }
   #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
@@ -134,7 +142,7 @@ sub check_ftp_url($$$$)
       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;
@@ -220,17 +228,17 @@ sub check_url($)
     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;
   }
 }