]> git.lyx.org Git - features.git/commitdiff
Cmake URL tests: Interpret 'Error 404' in received data as error.
authorKornel Benko <kornel@lyx.org>
Sat, 2 Jan 2016 10:29:11 +0000 (11:29 +0100)
committerKornel Benko <kornel@lyx.org>
Sat, 2 Jan 2016 10:29:11 +0000 (11:29 +0100)
development/checkurls/CheckURL.pm

index 8403c5dac392651499e29abe3e3546ad9137d959..2601e954fa466f137a0d456b8454c086491efff9 100755 (executable)
@@ -70,9 +70,14 @@ sub check_http_url($$$$)
   my $buf;
   my $n = $s->read_entity_body($buf, 1024);
   if (! defined($n)) {
-    print " Read from \"$protocol://$host$getp\" failed";
+    print " Read from \"$protocol://$host$getp\" ";
     return 3;
   }
+  if ($buf =~ /\<title\>Error 404\<\/title\>/) {
+    print " Page reports 'Error 404' from \"$protocol://$host$getp\" ";
+    return 3;
+  }
+  return 0;
 }
 
 # Returns ($err, $isdir)