Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28341
Modified Files:
SiteCapturer.java
Log Message:
Implement suggested change for
bug #1061869 Crashing when trying to capture link to XLS document
checking for null from getContentType().
Index: SiteCapturer.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/SiteCapturer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SiteCapturer.java 29 Jul 2004 01:50:19 -0000 1.6
--- SiteCapturer.java 14 Feb 2005 23:49:24 -0000 1.7
***************
*** 285,289 ****
connection = url.openConnection ();
type = connection.getContentType ();
! ret = type.startsWith ("text/html");
}
catch (Exception e)
--- 285,292 ----
connection = url.openConnection ();
type = connection.getContentType ();
! if (type == null)
! ret = false;
! else
! ret = type.startsWith ("text/html");
}
catch (Exception e)
|