Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Link Status Check and Empty URLs

Quote Reply
Link Status Check and Empty URLs
Many of my links have no associated URL. In the Link Status check, those with the default http:// are showing as errors in the Link Status check.

Thus:

100 - http:// - Request Failed (-5) Message: Bad URL format

Shouldn't the Link Status Check be ignoring this default state?

~ ERASER


Free JavaScripts @ Insight Eye
Quote Reply
Re: [Eraser] Link Status Check and Empty URLs In reply to
It shouldn't ignore it, but it probably shouldn't group the url in with the other bad urls. Here's a patch to change that:

Code:
--- admin/Links/Tools.pm 15 Jul 2008 19:48:59 -0000 1.197
+++ admin/Links/Tools.pm 1 Apr 2009 22:03:56 -0000
@@ -18,13 +18,14 @@
use vars qw/%STATUS_OK %STATUS_BAD %STATUS_NEW $LANGUAGE/;

%STATUS_OK = (
+ -99, "Default URL (http://)",
200, "OK 200",
201, "CREATED 201",
202, "Accepted 202",
203, "Partial Information 203",
302, "Found, but data resides under different URL (add a /)",
301, "Found, but moved",
- 303, "Method"
+ 303, "Method",
);

%STATUS_BAD = (
@@ -362,6 +363,7 @@
my $url = shift or return;
$url =~ /^\w+\:.+/ or return;
if ($url =~ /^https?/i) {
+ return -99 if $url eq 'http://'; # The default url
return -5 unless $url =~ /https?\:\/\/[\w-]+\..+/i;

require GT::WWW;

Adrian