- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Mar 2007 08:07:14 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv5569/httpd/cgi-bin Modified Files: check Log Message: Adding a check for a mime type / doctype conflict. Warning wording in progress, including suggestions by Philip "nikitathespider" and Frank Ellermann. Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.472 retrieving revision 1.473 diff -u -d -r1.472 -r1.473 --- check 2 Mar 2007 07:08:16 -0000 1.472 +++ check 7 Mar 2007 08:07:11 -0000 1.473 @@ -668,6 +668,21 @@ } # +# check the received mime type against Allowed mime types +if ($File->{ContentType}){ + my @allowedMediaType = split(" ", $CFG->{Types}->{$File->{DOCTYPE}}->{Types}->{Allowed}); + my $usedCTisAllowed = FALSE; + foreach (@allowedMediaType) { $usedCTisAllowed = TRUE if ($_ eq $File->{ContentType}); } + if(! $usedCTisAllowed ){ + &add_warning('W23', { + W23_type => $File->{ContentType}, + W23_type_pref => $CFG->{Types}->{$File->{DOCTYPE}}->{Types}->{Preferred}, + w23_doctype => $File->{Version} + }); + } +} + +# # Warn about unknown, incorrect, or missing Namespaces. if ($File->{Namespace}) { my $ns = $CFG->{Types}->{$File->{Version}}->{Namespace} || FALSE;
Received on Wednesday, 7 March 2007 08:07:19 UTC