- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 07 Sep 2007 06:15:30 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator In directory hutz:/tmp/cvs-serv32347/lib/W3C/LogValidator Modified Files: HTMLValidator.pm Log Message: reordering algorithm of URI filtering for HTML validator, if CheckExtensionlessURIs is ON, the mime type checking over the wire is unnecessary Index: HTMLValidator.pm =================================================================== RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/HTMLValidator.pm,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- HTMLValidator.pm 7 Sep 2007 05:44:36 -0000 1.26 +++ HTMLValidator.pm 7 Sep 2007 06:15:27 -0000 1.27 @@ -164,10 +164,15 @@ $uri_ext = $1; } elsif ($uri =~ /\/$/) { $uri_ext = "/";} - elsif ( $self->HEAD_check($uri) ) { $match = 1; } - foreach my $ext (@authorized_extensions) - { - if (($ext eq $uri_ext) or ($ext eq "*")) { $match = 1; } + 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; } + if ($match eq 0){ + foreach my $ext (@authorized_extensions) + { + if (($ext eq $uri_ext) or ($ext eq "*")) { $match = 1; } + } } if ($match) { @@ -184,9 +189,7 @@ } } - elsif (($uri_ext eq "") and $config{CheckExtensionlessURIs}) {$match = 1; } - # we keep URIs without extension, if asked to - push @trimmed_uris,$uri if ($match); + push @trimmed_uris,$uri if ($match); } print "trimmed list to ", scalar @trimmed_uris. " URIs\n"; return @trimmed_uris;
Received on Friday, 7 September 2007 06:15:32 UTC