--- kernel-impl/src/test/java/org/sakaiproject/content/impl/test/ContentHostingServiceTest.java (revision 26702) +++ kernel-impl/src/test/java/org/sakaiproject/content/impl/test/ContentHostingServiceTest.java (revision 26707) @@ -289,12 +289,12 @@ //Some popular test cases //First is really an excel file but incorrect extension //Next is a Word doc with correct extension - //Next is an html doc with correct extension + //Next is an html doc with correct extension REMOVED TO AVOID FALSE RESULT AFTER RECENT LOCAL CHANGE //Next is an really and excel file with no extension - //Last is a html snippet with correct extension + //Last is a html snippet with correct extension REMOVED TO AVOID FALSE RESULT AFTER RECENT LOCAL CHANGE - List fileNames = Arrays.asList("testEXCEL.mp3","testWORD.doc","testHTML.html","testEXCEL","LSNBLDR-359-snippet.html"); - List expectedMimes = Arrays.asList("application/vnd.ms-excel","application/msword","text/html","application/vnd.ms-excel","text/html"); + List fileNames = Arrays.asList("testEXCEL.mp3","testWORD.doc"/*,"testHTML.html"*/,"testEXCEL"/*,"LSNBLDR-359-snippet.html"*/); + List expectedMimes = Arrays.asList("application/vnd.ms-excel","application/msword"/*,"text/html"*/,"application/vnd.ms-excel"/*,"text/html"*/); //Set the mime magic to be true ServerConfigurationService serv = getService(ServerConfigurationService.class); --- kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java (revision 26702) +++ kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java (revision 26707) @@ -5923,7 +5923,12 @@ if (M_log.isDebugEnabled()) { M_log.debug("Magic: Setting content type from " + currentContentType + " to " + newmatch); } - edit.setContentType(newmatch); + if ("text/html".equals(newmatch)) { + M_log.info("No Magic: Not setting content type from " + currentContentType + " to " + newmatch); + } else { + edit.setContentType(newmatch); + M_log.debug("Magic: Setting content type from " + currentContentType + " to " + newmatch); + } } catch (IOException e) { M_log.warn("IOException when trying to get the resource's data: " + e); }