- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 20 Jul 2005 12:35:40 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/parser
In directory hutz:/tmp/cvs-serv11276
Modified Files:
CssFouffa.java
Log Message:
fix the case of a resource checked with no mime type (cf
http://www.w3.org/Bugs/Public/show_bug.cgi?id=953 )
Index: CssFouffa.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssFouffa.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- CssFouffa.java 12 Jul 2005 14:47:55 -0000 1.27
+++ CssFouffa.java 20 Jul 2005 12:35:37 -0000 1.28
@@ -401,9 +401,15 @@
importedURL = HTTPURL.getURL(importedURL, httpCL);
}
String mtype = httpURL.getContentType();
- if (mtype.toLowerCase().indexOf("text/html") != -1) {
- throw new FileNotFoundException(importURL.getURL()
- + ": You can't import" + " an HTML document");
+ if (mtype == null) {
+ throw new FileNotFoundException(importURL.getURL() +
+ "No Media Type defined");
+ } else {
+ if (mtype.toLowerCase().indexOf("text/html") != -1) {
+ throw new FileNotFoundException(importURL.getURL()
+ +": You can't import"
+ +" an HTML document");
+ }
}
}
Frame f = ac.getFrame();
Received on Wednesday, 20 July 2005 12:35:45 UTC