Re: double-click on scripts behaviour



I just re-read the spec and missed that piece, it's good to know it's
there.  Also relevant is the 'priority' tag on the magic info.  After
thinking about it some more, I realized my initial instinct was wrong,
the "MIME hierarchy" for a given file is not a property of that file,
but of the MIME type itself.  This greatly simplifies a number of the
problems, e.g. the *.tar.gz glob identifies a file as a
application/x-tar-gzip while sniffing identifies it as only
application/gzip.  Because application/gzip would be a "super-class" of
application/x-tar-gzip, the "most specific" MIME type is used.  In
situations like README.mp3, *.mp3 thinks it's audio/mp3 sniffing reveals
it to be text/plain which is not in the audio/mp3 hierarchy, so the MIME
type falls back to 'text/plain'.


Of course, making sure the MIME database contains an accurate
description of the entire hierarchy is another issue.

Alex: 
I wasn't describing a specific problem I had witnessed, just a generic
"maybe".  However, "we special case these" indicates a minor problem in
specification to me.  Rather than having to special case these files
types in every MIME-aware application, it makes more sense to "educate"
the underlying MIME database about these relationships and have it "Just
Work(tm)".

Also, I'd say not being able to register for text/* is another problem. 
But compared to some of the other issues with MIME at the moment, it's a
very minor one.

-- 
Shahms King <shahms shahms com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]