- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 04 Dec 2007 07:15:36 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator
In directory hutz:/tmp/cvs-serv698/lib/W3C/LogValidator
Modified Files:
CSSValidator.pm
Log Message:
adding CheckExtensionlessURIs and AuthorizedExtensions * capability for css validator module
Index: CSSValidator.pm
===================================================================
RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/CSSValidator.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- CSSValidator.pm 6 Sep 2007 06:20:36 -0000 1.19
+++ CSSValidator.pm 4 Dec 2007 07:15:33 -0000 1.20
@@ -52,6 +52,7 @@
$config{ShowInvalid} = "Yes" if (!exists $config{ShowInvalid});
$config{ShowAborted} = "No" if (!exists $config{ShowAborted});
$config{ShowValid} = "No" if (!exists $config{ShowValid});
+ $config{CheckExtensionlessURIs} = "No" if (!exists $config{CheckExtensionlessURIs});
bless($self, $class);
return $self;
}
@@ -143,10 +144,13 @@
$uri_ext = $1;
}
elsif ($uri =~ /\/$/) { $uri_ext = "/";}
+ elsif (($uri_ext eq "") and $config{CheckExtensionlessURIs}) {$match = 1; }
+ # we keep URIs without extension, if asked to
+ # otherwise, we check their mime type through the wire
elsif ( $self->HEAD_check($uri) ) { $match = 1; }
foreach my $ext (@authorized_extensions)
{
- if ($ext eq $uri_ext) { $match = 1; }
+ if (($ext eq $uri_ext) or ($ext eq "*")) { $match = 1; }
}
if ($match)
{
Received on Tuesday, 4 December 2007 07:15:45 UTC