Skip Menu |

This queue is for tickets about the MIME-Types CPAN distribution.

Report information
The Basics
Id: 124226
Status: resolved
Priority: 0/
Queue: MIME-Types

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.16
Fixed in: (no value)



Subject: Suboptimal choice of mime types?
With the latest 2.16 a number of CPAN modules started to fail their test suites. For example, in the Dancer-1.3202 distribution the following tests fail: ... # Failed test 'a mime_type is found with MIME::Types' # at t/04_static_file/01_mime_types.t line 16. # got: 'application/vnd.easykaraoke.cdgdownload' # expected: 'application/zip' # Looks like you failed 1 test of 10. t/04_static_file/01_mime_types.t .................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/10 subtests ... # Failed test 'mime_type can be forced' # at t/06_helpers/01_send_file.t line 83. # got: 'image/vnd.mozilla.apng' # expected: 'image/png' # Looks like you failed 1 test of 25. t/06_helpers/01_send_file.t ......................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/25 subtests ... Looking at the results it seems that instead of the widely used image/png now image/vnd.mozilla.apng is returned, similar in the case of application/zip. A similar problem is in the Catalyst-Controller-Imager-0.06 test suite (see CPAN RT #124225). The problem in App-revealup-0.21 (see https://github.com/yusukebe/App-revealup/issues/11 ) looks acceptable to me --- formerly image/x-bmp was expected, now it's image/bmp.
RT-Send-CC: MRGRIPH [...] cpan.org
On 2018-01-26 14:33:02, SREZIC wrote: Show quoted text
> With the latest 2.16 a number of CPAN modules started to fail their > test suites. For example, in the Dancer-1.3202 distribution the > following tests fail: > > ... > # Failed test 'a mime_type is found with MIME::Types' > # at t/04_static_file/01_mime_types.t line 16. > # got: 'application/vnd.easykaraoke.cdgdownload' > # expected: 'application/zip' > # Looks like you failed 1 test of 10. > t/04_static_file/01_mime_types.t .................... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/10 subtests > ... > > # Failed test 'mime_type can be forced' > # at t/06_helpers/01_send_file.t line 83. > # got: 'image/vnd.mozilla.apng' > # expected: 'image/png' > # Looks like you failed 1 test of 25. > t/06_helpers/01_send_file.t ......................... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/25 subtests > ... > > Looking at the results it seems that instead of the widely used > image/png now image/vnd.mozilla.apng is returned, similar in the case > of application/zip. > > A similar problem is in the Catalyst-Controller-Imager-0.06 test suite > (see CPAN RT #124225). > The problem in App-revealup-0.21 (see https://github.com/yusukebe/App- > revealup/issues/11 ) looks acceptable to me --- formerly image/x-bmp > was expected, now it's image/bmp.
Another one: MRGRIPH/Archive-Any-Plugin-Rar-0.02.tar.gz The test t/explicit-type.t fails here with MIME-Types 2.17. It seems that the module expects application/x-rar, but gets application/vnd.rar (Though if you think that "vnd" is better than "x-", then maybe the module has to adapt?)
CC: ;
Subject: Re: [rt.cpan.org #124226] Suboptimal choice of mime types?
Date: Sun, 28 Jan 2018 18:48:53 +0100
To: Slaven_Rezic via RT <bug-MIME-Types [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Slaven_Rezic via RT (bug-MIME-Types@rt.cpan.org) [180128 16:11]: Show quoted text
> Queue: MIME-Types > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=124226 > >
> > Looking at the results it seems that instead of the widely used > > image/png now image/vnd.mozilla.apng is returned, similar in the case > > of application/zip.
That should be fixed with 2.17. It is not easy to automatically determine which mime-type has preference for a certain extension. The logic has improved a little over 2.16. Show quoted text
> > A similar problem is in the Catalyst-Controller-Imager-0.06 test suite > > (see CPAN RT #124225). > > The problem in App-revealup-0.21 (see https://github.com/yusukebe/App- > > revealup/issues/11 ) looks acceptable to me --- formerly image/x-bmp > > was expected, now it's image/bmp.
> > Another one: MRGRIPH/Archive-Any-Plugin-Rar-0.02.tar.gz > The test t/explicit-type.t fails here with MIME-Types 2.17. It seems > that the module expects application/x-rar, but gets application/vnd.rar > (Though if you think that "vnd" is better than "x-", then maybe the > module has to adapt?)
IANA had changed their way of presenting information: the files which I parsed are frozen for 4 years, I discovered last week... now I use different ways to extract the official info from them, which resulted in 30% more types and extensions... "application/vnd.rar" is the officially assigned IANA type, so no chance that I move back to "application/x-rar". Regression tests which contain mime-types can easily break: it is an external moving target... -- As always: I am greatful for your testing and maintenance effort! MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
fixed in 2.17 (long time ago)