Bug 208714 - autodetect attachment type prefers application/octet-stream to text/plain
Summary: autodetect attachment type prefers application/octet-stream to text/plain
Alias: None
Product: Bugzilla
Classification: Community
Component: Attachments/Requests
Version: 2.18
Hardware: All
OS: Linux
medium vote
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact: David Lawrence
: 349531 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2006-09-30 17:16 UTC by John Reiser
Modified: 2013-06-24 02:44 UTC (History)
0 users

Clone Of:
Last Closed: 2008-02-06 15:37:57 UTC

Attachments (Terms of Use)

Description John Reiser 2006-09-30 17:16:25 UTC
Description of problem: If an attachment MIME type is not specified, then
bugzilla prefers application/octet-stream even when text/plain is correct. 
Text/plain is much more usable because all browsers can deal with it, so you can
View attachments easily directly from bugzilla.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Browse to select a text file to attach
2. Let bugzilla auto-detect file type (instead of manually selecting text/plain)
Actual results:
An actual text/plain file is auto-detected as application/octet-stream.

Expected results:
Actual text/plain is auto-detected as text/plain.

Additional info:
See attachments #2 and #3 to Bug #208712.  These are perfectly good text files
(no control characters except '\n' and possibly '\t') but bugzilla chose
application/octet-stream.  I changed it afterwards, using Edit.

Comment 1 Matěj Cepl 2007-12-21 13:44:45 UTC
Alternative solution for this would be to allow list of patterns (probably
normal glob patterns would be enough) which would we mean that for example
anything which looks like xorg.conf or Xorg.*.log* would end up as text/plain
(and not like now in application/octet-stream).

Of course, the solution suggested in this bug report would be OK as well. But
somebody should do something about it -- I waste tons of time on fixing freezing
MIME types.

Comment 2 Matěj Cepl 2008-02-06 15:36:21 UTC
*** Bug 349531 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.