[dev] mime recognition - extension based

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


Sorry - I sent this to the wrong list. Doh.

----- Forwarded message from slusarz@bigworm.colorado.edu -----
    Date: Wed, 10 Jul 2002 16:50:26 -0600
    From: Michael M Slusarz <slusarz@bigworm.colorado.edu>
Reply-To: Michael M Slusarz <slusarz@bigworm.colorado.edu>
 Subject: [imp] Re: [dev] mime recognition - extension based
      To: imp@lists.horde.org

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

-- 
IMP mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe@lists.horde.org

----- End forwarded message -----


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