Package: libfile-mmagic-xs-perl Version: 0.09008-2+b1 Severity: normal Dear Maintainer,
Using File::MMagic::XS I found that it sometimes identified HTML as text/plain. I have taken two examples and removed at lot from them to produce small examples. (I won't call them minimal as there are at least 4 ways to "fix" one of them). I have attached 6 files: 1-wrong.html: An example that is far from valid HTML, but `file` still gets right 2-wrong.html: An example that is better HTML 2-1.html: First way to "fix" 2-wrong.html 2-2.html: Second way to "fix" 2-wrong.html 2-3.html: Third way to "fix" 2-wrong.html 2-4.html: Fourth way to "fix" 2-wrong.html Output of file and a simple perl script to determine MIME type below: grove@mary> file 1-wrong.html 1-wrong.html: HTML document, ASCII text grove@mary> perl -E 'use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); say $m->checktype_filename("1-wrong.html")' text/plain grove@mary> file 2-wrong.html 2-wrong.html: HTML document, ASCII text, with very long lines grove@mary> perl -E 'use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); say $m->checktype_filename("2-wrong.html")' text/plain grove@mary> perl -E 'use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); say $m->checktype_filename("2-1.html")' text/html grove@mary> perl -E 'use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); say $m->checktype_filename("2-2.html")' text/html grove@mary> perl -E 'use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); say $m->checktype_filename("2-3.html")' text/html grove@mary> perl -E 'use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); say $m->checktype_filename("2-4.html")' text/html -- System Information: Debian Release: 8.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=da_DK.UTF-8, LC_CTYPE=da_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages libfile-mmagic-xs-perl depends on: ii libc6 2.19-18+deb8u4 ii perl 5.20.2-3+deb8u5 ii perl-base [perlapi-5.20.0] 5.20.2-3+deb8u5 libfile-mmagic-xs-perl recommends no packages. libfile-mmagic-xs-perl suggests no packages. -- no debconf information (The newer version in testing+unstable seems to be a rebuild of the same source, so I guess that won't make a difference)
|