[imp] Binary attachments given mime type text/plain. why?

Michael M Slusarz slusarz at bigworm.colorado.edu
Fri Nov 7 11:28:41 PST 2003


Quoting Ahmed <ashihab at alcahest.com>:

|
| Quoting Michael M Slusarz sent on Fri 07 Nov 2003 16:39:11 GMT
| >
| > Does this happen with all executable files?  If so, it is possible that
| > .xex
| > is a text format recognized by your OS/browser, so that when you upload
| > it
| > your browser is reporting it as text/plain data to IMP (which we MUST
| > honor).
|
| This happens to other files with extensions like .xxx .zzz and .bin
| they are all the same file with different extensions. they are reported
| as
| text/plain
|
| > If it is specific only to this file, then we should be looking
| elsewhere
| > (do you have mime magic support turned on?)
|
| I'm using mozilla 1.5 release, also happens on IE 6.0.2800.1106 both on
| win2k.
|
| mime magic is turned on, here is the excrept from test.php

In my tests (using an old DOS executable file) with both an .exe and a .xex
extension on the file, both browsers I am using (IE 6, Mozilla Firebird 0.7
on Win2K) send the MIME type as application/octet-stream.  Then the mime
magic process runs on the file and determines it to be
'application/x-dosexec', which is correct.  None of my examples ever come
up with 'text/plain'.

Try turning mime magic off (comment out line 169 of horde/lib/MIME/Magic.php
and replace with 'return false;') and see what happens.

michael

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


More information about the imp mailing list