[imp] Re: [dev] mime recognition - extension based

Michael M Slusarz slusarz@bigworm.colorado.edu
Wed, 10 Jul 2002 16:50:26 -0600


Quoting Eric Rostetter <eric.rostetter@physics.utexas.edu>:

| If done for attachments, it should only be done when the MIME information
| is absent or insufficient (application/octet-stream) to justify it.

This current HEAD code only guesses for 'application/octet-stream' subtypes.

| since MSIE is so
| brain dead that even if you give it the correct mime type it will over
| ride
| that info with its stupid file extension matching.

Tell me about it.  I spent a couple of hours today trying to figure out how 
to "trick" IE into correctly using the filename we provide it when 
downloading.

| 
| If I'm correct as to what Michael is talking about, then I like his
| approach.
| It leave the attachment there as-is, and then adds an *additional* entry
| with his guess.  Then I can ignore the guess if it is wrong, or use it if
| it is right, without problems...

That's what it does.  We will *NEVER* show the guessed mime type without 
further user interaction because 1) it would break RFCs and 2) it just 
isn't safe.

BTW - in case you are not running HEAD, this is what the code currently 
does:
http://bigworm.colorado.edu/imp/screenshot_guess.png

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder