*) Bugfix: supportedFileExt Function didn't detect the file extension correctly because of missing conversion to lower case

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@837 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 8a33c9b309
commit 0fd9aa6c6e

@ -301,6 +301,8 @@ public final class plasmaParser {
public static boolean supportedFileExtContains(String fileExt) {
if (supportedFileExt == null) return false;
if (fileExt == null) return false;
fileExt = fileExt.trim().toLowerCase();
synchronized(supportedFileExt) {
if (supportedFileExt.contains(fileExt)) return true;
@ -313,6 +315,7 @@ public final class plasmaParser {
public static boolean mediaExtContains(String mediaExt) {
if (mediaExt == null) return false;
mediaExt = mediaExt.trim().toLowerCase();
synchronized (supportedFileExt) {
if (supportedFileExt.contains(mediaExt)) return false;
@ -330,9 +333,10 @@ public final class plasmaParser {
public static String getRealMimeType(String mimeType) {
//if (mimeType == null) doMimeTypeAnalysis
if (mimeType == null) mimeType = "application/octet-stream";
mimeType = mimeType.trim().toLowerCase();
int pos = mimeType.indexOf(';');
return ((pos < 0) ? mimeType : mimeType.substring(0, pos)).toLowerCase();
return ((pos < 0) ? mimeType : mimeType.substring(0, pos));
}
public static String getMimeTypeByFileExt(String fileExt) {

Loading…
Cancel
Save