Fix for ALF-2118:

- Added new method to MimetypeService to retrieve a valid mimetype given any extension, handling case and missing values
 - Updated JUnit tests for MimetypeService methods
 - Fixed callers of MimetypeService to use new method to protect against varying case of file extensions (ALF-2118 root cause)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19400 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2010-03-19 14:45:29 +00:00
parent 7b4b6d3537
commit cd7526ceca
3 changed files with 6 additions and 18 deletions

View File

@@ -174,11 +174,7 @@ public class UploadContentServlet extends BaseServlet
if (extIndex != -1)
{
String ext = filename.substring(extIndex + 1);
String mt = mimetypeMap.getMimetypesByExtension().get(ext);
if (mt != null)
{
mimetype = mt;
}
mimetype = mimetypeService.getMimetype(ext);
}
}
}