Re: [hatari-devel] disk image mime-types (was: hatari-ui icon)

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On lauantai 06 joulukuu 2014, David Savinkoff wrote:
> Hi, I'm all for mime-types, however, I've got more questions
> than answers.
> 
> 1) What happens if two different parties want the .DIM extension?
> 2) Will this impact the mime-type?
> 3) How are 'magic, mime-type and extension' algorithms and
>     databases impacted in Linux, Unix, Windows, Apple, other
>     operating systems and web servers?
> 4) How is the mime-type determined if there is no Magic, and
>     the file.extension is ambiguously used by several parties?

Match conflicts are expected, and at least some handling of them
is designed to Linux MIME type handling.


> I expect the "mime-type Registrar" would have strict rules to
> avoid indeterminable mime-types (with ad-hoc extensions).
> 
> If the "mime-type Registrar" is not disorganized, I would expect
> that a .ST file would have to be put in a 'disk dump' category
> because it has no 'magic' header. Maybe this would require
> a different file.extension.

The extensions (file name patterns) already exist & are used by users,
so I think whether they conflict or not isn't relevant, it's just a fact.

I assume that what can be registered is name for the content type
("application/vnd.msa-disk-image").

This is how it works on Linux:
http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-
spec-latest.html

It has rules for handling conflicts:
1. explicit mime-type (given e.g. by www-server)
2. glob pattern (file name)
3. magic (file content)

These can have different priorities (most useful for cases
like "*.tar.gz" and "*.gz") and user can select which
application (advertising support for given type) he wants
to use.  Depending on OS/desktop environment, user may also
be able to edit these mappings, e.g. in case he has just one
of the conflicting types.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/