Bug 907

Summary: text/x-log attachments aren't opened in Firefox like text/plain
Product: Infrastructure Reporter: Ahmad Samir <ahmadsamir3891>
Component: BugzillaAssignee: Sysadmin Team <sysadmin-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: LpSolit, dmorganec, marja11, misc, sysadmin-bugs
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Ahmad Samir 2011-04-20 20:16:22 CEST
Usually when users attach .log files the mimetype gets set to text/x-log, Firefox doesn't open that mimetype like it does with text/plain, this is a major annoyance as anyone who wants to examine the log will have to change the mimetype in the Details of the attachment, or download it to view it with any text editor.

LpSolit suggested installing an extension that converts text/x-log to text/plain in bugzilla server side (he also said this extension is used in the Mozilla Bugzilla).

The extension: http://bzr.mozilla.org/bugzilla/extensions/typesniffer/trunk/files
it'll need  File::MimeInfo::Magic and IO::Scalar to work.
Ahmad Samir 2011-04-20 20:16:33 CEST

CC: (none) => LpSolit

Comment 1 Michael Scherer 2011-04-20 20:46:10 CEST
We have a few choice :
 - do a bzr checkout
 - import the code in our svn 

It should be easy to get it going.

CC: (none) => misc

Comment 2 Frédéric "LpSolit" Buclin 2011-04-20 22:54:22 CEST
Note that the extension would need to be modified a bit, but it's trivial to do.
Comment 3 Marja Van Waes 2011-10-09 23:12:26 CEST
(In reply to comment #2)
> Note that the extension would need to be modified a bit, but it's trivial to
> do.

Having enough time to do it is less trivial, I guess. This wasn't done yet, was it?

CC: (none) => marja11

Comment 4 Marja Van Waes 2012-01-13 22:07:48 CET
(In reply to comment #0)
> Usually when users attach .log files the mimetype gets set to text/x-log,
> Firefox doesn't open that mimetype like it does with text/plain, this is a
> major annoyance as anyone who wants to examine the log will have to change the
> mimetype in the Details of the attachment, or download it to view it with any
> text editor.
> 
> LpSolit suggested installing an extension that converts text/x-log to
> text/plain in bugzilla server side (he also said this extension is used in the
> Mozilla Bugzilla).
> 
> The extension:
> http://bzr.mozilla.org/bugzilla/extensions/typesniffer/trunk/files
> it'll need  File::MimeInfo::Magic and IO::Scalar to work.


@ Frédéric
@ Dexter

Will this extension be needed in Bugzilla 4, too?
Comment 5 Marja Van Waes 2012-01-13 22:08:44 CET
(forgot to cc D morgan)

CC: (none) => dmorganec

Nicolas Vigier 2012-01-13 23:05:33 CET

Status: NEW => ASSIGNED
CC: (none) => boklm

Comment 6 Frédéric "LpSolit" Buclin 2012-01-14 00:45:54 CET
(In reply to comment #4)
> Will this extension be needed in Bugzilla 4, too?

Yes, the MIME type detection didn't change between 3.6 and 4.0.
Romain d'Alverny 2012-01-14 10:30:06 CET

CC: mageia-webteam => rdalverny

Romain d'Alverny 2012-01-14 10:30:34 CET

CC: rdalverny => (none)

Comment 7 Frédéric "LpSolit" Buclin 2012-08-14 21:09:44 CEST
This feature has been implemented in Bugzilla 4.4. It will be a single line of code to convert text/x-log to text/plain.
Comment 8 Manuel Hiebel 2013-02-20 18:20:00 CET
(In reply to Frédéric Buclin from comment #7)
> This feature has been implemented in Bugzilla 4.4. It will be a single line
> of code to convert text/x-log to text/plain.

which we have now, closing.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Nicolas Vigier 2014-05-08 18:05:53 CEST

CC: boklm => (none)