Open
Bug 85132
Opened 23 years ago
Updated 10 years ago
BugZilla should check/auto-correct new attachment MIME types
Categories
(Bugzilla :: Attachments & Requests, enhancement, P5)
Bugzilla
Attachments & Requests
Tracking
()
NEW
People
(Reporter: roland.mainz, Unassigned)
Details
BugZilla's attachment code should support compressed content. There should be a dropdown/checkbox to indicate that the attached file is mimetype=xyz and compressed via compress/gzip/etc. BugZilla should _verify_ that the attached content is really compressed and return an error if it cannot find the matching magic numbers (see /etc/magic and file(1)) for compress/gzip/etc. in the incoming upload stream...
Reporter | ||
Comment 1•23 years ago
|
||
Oh... I forgot the comment "why": Why: The browser should be able to decompress the file on-the-fly...
Updated•23 years ago
|
Priority: -- → P5
Target Milestone: --- → Future
Updated•23 years ago
|
Component: Bugzilla → Creating/Changing Bugs
Product: Webtools → Bugzilla
Version: other → unspecified
Component: Creating/Changing Bugs → attachment and request management
Comment 3•21 years ago
|
||
This is so not worth doing :-) It's useful only for testing on-the-fly decompression in Mozilla - and you can set up your own webserver for that. There's no real benefit to Bugzilla in doing this, given that not all browsers support on-the-fly decompression, so we'd need to sniff etc. etc. Gerv
i'm going to agree with gerv, this is not worth it. there are 852 bugs for bugzilla with milestone 1.18 or future, marking this as WONTFIX will save the bugzilla team 0.12% of the effort to close all of these bugs. :)
Flags: approval-
Comment 5•21 years ago
|
||
Jay, please don't set the "approval" flag. That flag is only for project maintainers to say in whether patches to fix bugs can get checked in. There is some value to compression. Compressed attachments transfer much more quickly over the wire and take up less space in the database, and since attachments are the number one database hog on b.m.o, anything that improves the situation is welcome. On the other hand, Bugzilla already supports compression in that it accepts compressed attachments and returns them in the same compressed format. Also, users shouldn't have to deal with compression themselves; Bugzilla should take care of it for them. This bug needs clarification: BugZilla's attachment code should support compressed content -- FIXED There should be a dropdown/checkbox to indicate that the attached file is mimetype=xyz and compressed via compress/gzip/etc. -- WONTFIX (Bugzilla should be able to figure this out without having to ask the user) BugZilla should _verify_ that the attached content is really compressed and return an error if it cannot find the matching magic numbers (see /etc/magic and file(1)) for compress/gzip/etc. in the incoming upload stream. -- NEW, but Bugzilla should trust that the user knows what they want to do and throw only a warning or just change the MIME type to the correct one if it knows what it is; plus this is useful for files in general, not just compressed content Since only one issue remains (checking/auto-correcting MIME types), I'm going to morph this bug to deal with it. It's not clear that we can use file(1) and magic for this; on my system at least that mechanism stores human-readable descriptions of file types without any clear MIME type mapping. Note also bug 157237 about compressed attachments.
Flags: approval-
Summary: BugZilla should support compressed attachments... → BugZilla should check/auto-correct new attachment MIME types
Comment 6•21 years ago
|
||
Myk, You must be looking at /etc/magic rather than /etc/magic.mime (or /usr/share/magic.mime). File::MMagic, which is the module that guesses mime types using magic files, has a magic.mime internally pasted into it that it can use (of course, I think this is a horrible idea, since they have bugs, and get updated often, so the internal one is always out of date and more buggy than what is on someone's system, and it *defaults* to using the internal one, rather than as a fallback). It's trivial to use the module, however. This bug would take a whole of 3.6 minutes to fix. :) I had been using File::MMagic in both my gnats2bz.pl rewrite, and a similar python module in the python rewrite.
Comment 7•21 years ago
|
||
Hmm... we could do something along the lines of "your browser told us the file you sent was 'text/plain' but the content of the file seems to look like it should be 'text/html'. If your browser was wrong, please go fix the attachment type (with a link) or something to that effect. Or maybe even a link that just goes and does it.
Updated•18 years ago
|
QA Contact: mattyt-bugzilla → default-qa
Updated•18 years ago
|
Target Milestone: Future → ---
Updated•18 years ago
|
Assignee: myk → attach-and-request
You need to log in
before you can comment on or make changes to this bug.
Description
•