[horde] Confused about MIME mappings comments in FRAMEWORK_3

Michael M Slusarz slusarz at mail.curecanti.org
Tue Jul 19 10:10:26 PDT 2005


Quoting Kevin Myer <kevin_myer at iu13.org>:

> I wanted to add a MIME type to a mapping (somewhere) so that it is 
> recognized as
> a MS Word document.  I had't figured out exactly where to do that so 
> I started
> poking around in the code.  In the FRAMEWORK_3 CVS code, there is a
> horde/scripts/mime_mapping/ folder that isn't present in any 
> releases, but its
> referenced in horde/lib/Horde/MIME/mime.mapping.php in release code, 
> as the way
> to update MIME mappings.  Is that just some carryover comments from HEAD?

MIME mappings are updated by the developers as needed so there is no 
need for the generation code in scripts/ to be included in production 
releases.
> So, perhaps a silly question on top of this:  there's code to 
> determine a file's
> type, through either the MIME type or using MIME magic (which is where I was
> originally poking).  There's code to invoke a driver for a particular MIME
> type(s), hardcoded in horde/config/mime_drivers.php.  Why not invoke 
> a driver,
> based on the results of either invoking MIME magic, or MIME mapping to
> determine a file type, instead of using hardcoded MIME mapping values?

Because when you are dealing with a MIME part, you are given the MIME 
type.  There is no need to do MIME mapping or MIME magic.

Explained differently, config/mime_drivers.php is configuration for the 
MIME_Viewer library.  It is completely separate and independent from 
the MIME magic/MIME mapping code.

michael

_______________________________________
Michael Slusarz [slusarz at curecanti.org]


More information about the horde mailing list