[cups.general] mime.types - what am I missing

Johannes Meixner jsmeix at suse.de
Wed Feb 2 06:47:29 PST 2005


Hello,

On Feb 2 08:35 Michael Sweet wrote (shortened):
> Johannes Meixner wrote:
> > Michael Sweet wrote:
> > 
> > > The MIME types are sorted alphabetically...
> > 
> > What is the reason to sort them alphabetically?
> 
> Since we load all .types files, which may appear in any order,
> we cannot rely on the order of definition
....
> Normally it is not an issue, since file types are supposed to be
> unique.  You only run into ordering issues when you want to overload
> an existing type...

When file types are normally unique then it should also work
for the normal cases to use a reverse-alphabetical ordering
but then the advantage would be that "some-mime-type-special-case"
would be sorted (and tested) before "some-mime-type".

I.e. when one wants to add a special case to an existing MIME type
one would normally add a suffix to the existing MIME type name
and reverse-alphabetical ordering would make sure that the
special cases are tested before the general (fallback) cases.


Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/





More information about the cups mailing list