Closed GoogleCodeExporter closed 9 years ago
patch:
if (type != null &&
(type.getValue().toLowerCase().contains("image")
||type.getValue().toLowerCase().contains("audio")
||type.getValue().toLowerCase().contains("video"))) {
Original comment by wanxiang.xing@gmail.com
on 18 Mar 2011 at 11:22
Attachments:
My by this way is better:
if ( mimeType == null || mimeType.indexOf("text") >= 0 || mimeType.indexOf("xml") >= 0 || mimeType.indexOf("javascript") >= 0 ) {
}else{
isBinary=true;
}
Original comment by wanxiang.xing@gmail.com
on 19 Mar 2011 at 3:44
My by this way is better:
if ( mimeType == null || mimeType.indexOf("text") >= 0 || mimeType.indexOf("xml") >= 0 || mimeType.indexOf("javascript") >= 0 ) {
}else{
isBinary=true;
}
Original comment by wanxiang.xing@gmail.com
on 19 Mar 2011 at 3:45
I have fixed this as you suggested in the svn version.
-Yasser
Original comment by ganjisaffar@gmail.com
on 29 Mar 2011 at 2:49
Tanks Yasser!
to download zip, doc & other things the below is better:
if (type != null) {
String mimeType = type.getValue().toLowerCase();
if ( mimeType.indexOf("text") >= 0 || mimeType.indexOf("xml") >= 0 || mimeType.indexOf("javascript") >= 0 ) {
//do nothing
}else{
isBinary=true;
if (ignoreIfBinary) {
return PageFetchStatus.PageIsBinary;
}
}
}
Original comment by wanxiang.xing@gmail.com
on 9 Apr 2011 at 5:39
Original issue reported on code.google.com by
wanxiang.xing@gmail.com
on 18 Mar 2011 at 10:12