From: Kornel Benko Date: Sat, 2 Jan 2016 21:18:13 +0000 (+0100) Subject: Cmake URL tests: Better search for error 404, in received html snippet. X-Git-Tag: 2.2.0beta1~273 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=99a2647fd2840a00649a3a10f73baf3c54b35f7c;p=features.git Cmake URL tests: Better search for error 404, in received html snippet. --- diff --git a/development/checkurls/CheckURL.pm b/development/checkurls/CheckURL.pm index 2601e954fa..b7d0e032d3 100755 --- a/development/checkurls/CheckURL.pm +++ b/development/checkurls/CheckURL.pm @@ -73,9 +73,14 @@ sub check_http_url($$$$) print " Read from \"$protocol://$host$getp\" "; return 3; } - if ($buf =~ /\Error 404\<\/title\>/) { - print " Page reports 'Error 404' from \"$protocol://$host$getp\" "; - return 3; + if ($buf =~ /\([^\<]*404[^\<]*)\<\/title\>/i) { + my $title = $1; + $title =~ s/\n/ /g; + print "title = \"$title\"\n"; + if ($title =~ /Error 404|404 Not Found/) { + print " Page reports 'Error 404' from \"$protocol://$host$getp\" "; + return 3; + } } return 0; }