Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357723 - default attachment behavior should be "auto-detect"
Summary: default attachment behavior should be "auto-detect"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Bugzilla (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bugzilla Admins
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 09:53 UTC by SpanKY
Modified: 2011-10-30 23:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2011-03-07 09:53:08 UTC
when you create a new bug, and click the "Add Attachment" button, the little pop out form does not let you explicitly specify a mime type.

after uploading a png image (whose filename ended in ".png"), i noticed the default mime type is set to text/plain.  this is probably going to be wrong for most attachments out there.
Comment 1 Frédéric Buclin 2011-03-07 16:31:41 UTC
It's there. You must click the "Show Advanced Fields" link at the top of the page.
Comment 2 SpanKY gentoo-dev 2011-03-07 21:57:44 UTC
true, but most people will be coming in without said advanced options enabled which means we'll be getting (even more) bunches of wrong mime types set which need manual fixing.  in previous bugzilla, the advanced stuff was always shown which means the user for the most part would get it right.

i'm not advocating turning on the advanced options by default.  the default selected option should be "auto-detect" and not "select from list: plain/text".

i guess this applies mostly to the enter_bug.cgi step, but could apply to the additional attachment.cgi step after the fact.
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2011-03-07 22:09:54 UTC
The "text/plain" as default came from our bugzilla 2.x patches.
So text/plain was "always" default since auto-detect is often worse than text/plain. auto-detect is even browser related IIRC.
Comment 4 Frédéric Buclin 2011-03-07 22:18:07 UTC
(In reply to comment #3)
> So text/plain was "always" default since auto-detect is often worse than
> text/plain. auto-detect is even browser related IIRC.

It's browser-related, yes, but unless your browser is completely stupid, it at least detect all images correctly, and most text/* files.
Comment 5 SpanKY gentoo-dev 2011-03-07 22:34:46 UTC
so where is the auto-detection being done ?  my understanding is that the *server* auto detects it and sets the explicit mime type based on the incoming file.  so after that, the browser is irrelevant since the server sends that explicit mime type to the browser.

or does auto-detect mean the server doesnt specify any mime type at all ?  and it lets the browser auto-detect the format ?
Comment 6 Frédéric Buclin 2011-03-07 22:44:42 UTC
The browser passes the file MIME type (Content-Type) as part of the CGI data, and Bugzilla simply gets this information from the browser. In no way is the MIME type guessed by Bugzilla.
Comment 7 Christian Ruppert (idl0r) gentoo-dev 2011-04-25 16:32:18 UTC
Fixed and I also added the typesniffer extension to our Bugzilla, https://bzr.mozilla.org/bugzilla/extensions/typesniffer which hopefully helps "us" to properly detect the file/mime-type if the browser isn't able to do so.