Review Request: JDK-7142921, (fs) Files.probeContentType reports a MIME type of "text/plain" on Ubuntu 11.04
Mike Duigou
mike.duigou at oracle.com
Mon Nov 26 10:27:08 PST 2012
I am concerned about relying on the location of the mime.types file on mac :
/private/etc/apache2/mime.types
The Apache installation included in MacOS X was partially disabled in Mountain Lion (10.8) and it seems possible that they will eventually remove it or replace it with a different server.
Mike
On Nov 25 2012, at 22:40 , Dan Xu wrote:
> Hi,
>
> Please help review the code changes for CR 7142921 and CR 7144997. The webrev is uploaded to, http://cr.openjdk.java.net/~dxu/7142921/webrev.00/.
>
> In the fix, I added two new file type detectors, one is MimeTypesFileTypeDetector, and the other is MagicFileTypeDetector. MimeTypesFileTypeDetector is using a file name extension to look up its MIME type by checking mime.types files, which can be used in Linux, Solaris, and Mac. MagicFileTypeDetector is using libmagic to detect a file type in Linux. The library, libmagic, is provided in the same package of file command, which is currently only available in Linux platform.
>
> Thanks,
>
> -Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121126/58d64772/attachment.html
More information about the nio-dev
mailing list