Closed jg0000 closed 7 years ago
Can you please provide an example of a case that mimetype
does NOT handle, but /usr/bin/file
does handle correctly?
Hi Michiel
Please see attached test file.
My tests:
/tmp/mimetestfile: text/plain
/tmp/mimetestfile: HTML document, ISO-8859 text, with very long lines
Regards,
Jie
Date: Thu, 31 Dec 2015 02:07:00 -0800 From: Michiel Beijen notifications@github.com To: mbeijen/File-MimeInfo File-MimeInfo@noreply.github.com CC: jg0000 j.gao@sydney.edu.au Subject: Re: [File-MimeInfo] Not identifying file of the type text/html if file does not contain the "" tag. (#19)
Can you please provide an example of a case that
mimetype
does NOT handle, but/usr/bin/file
does handle correctly?
Reply to this email directly or view it on GitHub: https://github.com/mbeijen/File-MimeInfo/issues/19#issuecomment-168161023
|
Determining that a file is an HTML file when it is called something
and not something.html
and it merely contains some tags that look like HTML but not the required <html>
- I'm not sure if I'd find it correct, it might lead to other sorts of problems. File::MimeInfo
does not need to be bug-compatible with /usr/bin/file
. Closing.
This package also contains two related utilities:
If a file does not contain the
<html>
tag, /usr/bin/mimetype identifies the file as text/plain. /usr/bin/file seems to be more intelligent, or more tolerant, in this regard.