[imp] Wrong mimetype

Anders Thorsby anders@thorsby.dk
Fri, 5 Jul 2002 20:37:21 +0200


Quoting Michael M Slusarz <slusarz@bigworm.colorado.edu>:
> There is nothing we can do about clients that send excel files 
> in 'application/octet-stream' to us.  #1) You must honor the content-type 
> of the message sent to you according to RFCs and #2) security concerns.  
Very good reasons. I get your point.
But...the solution below would be very great! However, it does not solves the 
problem for incoming mail. There will still be many other (broken) mail clients 
out there, sending with a wrong mimetype.
Is it correct understood that, application/octet-stream just means it's a 
binary stream, not associated with anything specific?
Could one introduce the MIME_Magic:: detection on incoming mail as well? As I 
see it, that would not introduce security problems - the sender could just 
specify that mimetype, if he wanted to bug me. Or maybe just a "force view 
with" button, for forcing the viewer to launch as eg. Excel with xlhtml. For 
now I can't do anything about received Excel documents...it just pops up with 
download dialog, and that does not helps me to view it in any way.

> For IMP sending - it uses the content-type reported to it by the browser 
> when attaching files.  Thus, if your browser/OS doesn't report the correct 
> mime type or, more likely, any mime type, the part will be sent as 
> application/octet-stream.  We could use MIME_Magic:: class to help us out 
> in the case that the browser doesn't send any mime type information - I 
> will look into this.  The only problem with this is that if MIME_Magic 
> guesses incorrectly, the receiving person will not be able to view the part 
> correctly.
Great.
Setting it as application/octet-stream does not make them able to any way.


-- 
regards
Anders Thorsby