Bug 208714

Summary: autodetect attachment type prefers application/octet-stream to text/plain
Product: [Community] Bugzilla Reporter: John Reiser <jreiser>
Component: Attachments/RequestsAssignee: PnT DevOps Devs <hss-ied-bugs>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.18   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-06 15:37:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
2.18

How reproducible:
always

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)
3.
  
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. ***