Summary | MIME types of uploaded attachment files |
Queue | IMP |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | Horde Developers (at) |
Requester | gereke (at) thomasgereke (dot) de |
Created | 06/22/2004 (7721 days ago) |
Due | |
Updated | 11/20/2004 (7570 days ago) |
Assigned | 07/12/2004 (7701 days ago) |
Resolved | 11/20/2004 (7570 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
text parts. I have added code to strip this from the output.
As far as identifying the file as 'text/x-c' rather than 'text/plain',
IMHO this is actually *exactly* why magic is better than file
extension checking. This really is a C file, not a text/plain file,
and the fact that IMP has not been configured to handle text/x-c
should not alter this decision.
Just wondering if maybe we should add a text/* viewer in horde that
will do a simple display of a text file in the event that no specific
text/foo entry matches.
database, so no, I can't reproduce it.
Assigned to
Taken from Jan Schneider
able to reproduce this?
Priority ⇒ 1. Low
State ⇒ Assigned
New Attachment: junixsocket.c
with "(text/x-c; charset=us-ascii)" (in the compose window). When
pressing preview a new browser window opens, but then the save as
dialog appears.
That's the same what file -i returns.
When the message returns (send to myself) the mime type changed to
"text/x-c" which is also not recognized by enscript by default.
When I skip fileinfo support in Horde/MIME/Magic.php the display of c
files is ok.
with "(text/x-c; charset=us-ascii)" (in the compose window). When
pressing preview a new browser window opens, but then the save as
dialog appears.
That's the same what file -i returns.
When the message returns (send to myself) the mime type changed to
"text/x-c" which is also not recognized by enscript by default.
When I skip fileinfo support in Horde/MIME/Magic.php the display of c
files is ok.
State ⇒ Feedback
described in 2? I can't reproduce this.
Priority ⇒ 1. Low
Type ⇒ Bug
Queue ⇒ IMP
State ⇒ Unconfirmed
It seems that MIME types of attachments are first taken from the
client. This is not optimal I think: with Firefox the MIME type
changes after downloading files with wrong types. Example: download
PDF file with MIME type 'x-application/octetstream'. Upload another
PDF file as attachment to Imp. Its MIME type will be
'x-application/octetstream'. So it cannot be displayed like a PDF.
2.
The fileinfo output is preferred over the mapping by extension when
searching for MIME types. This may be ok - but fileinfo returns MIME
types which are unexpected to Imp/Horde. For example: c files are
returned as 'text/x-c; charset: us-ascii'. The MIME handlers do not
cut the charset prefix, so the file isn't displayed by preview with
enscript but offered to download.
I think on text files, it will be preferrable to take the file
extension instead of the fileinfo answer as this is not accurate anyway.
I'm using
* Horde: 3.0-cvs
* Imp: 4.0-cvs
* Ingo: 1.0-cvs
* Turba: 2.0-cvs
from 06/16/2004.
And
PHP Version 4.3.7
Apache/2.0.49
pecl fileinfo 0.2
file 4.09