- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Sep 2005 15:57:02 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/css
In directory hutz:/tmp/cvs-serv3702
Modified Files:
XMLStyleSheetHandler.java
Log Message:
safer mime type checking
Index: XMLStyleSheetHandler.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/XMLStyleSheetHandler.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- XMLStyleSheetHandler.java 29 Aug 2005 14:51:20 -0000 1.19
+++ XMLStyleSheetHandler.java 7 Sep 2005 15:57:00 -0000 1.20
@@ -164,8 +164,8 @@
try {
new MimeType(type);
} catch (Exception ex) { /* at worst, null */ };
- if (MimeType.TEXT_CSS.match(mt) ==
- MimeType.MATCH_SPECIFIC_SUBTYPE ) {
+ if (mt != null && (MimeType.TEXT_CSS.match(mt) ==
+ MimeType.MATCH_SPECIFIC_SUBTYPE)) {
// we're dealing with a stylesheet...
URL url;
Received on Wednesday, 7 September 2005 15:57:13 UTC