| Summary: | tar.gz attachments are not accepted unless binary/octet stream is explicitly specified | ||
|---|---|---|---|
| Product: | [Community] Bugzilla | Reporter: | Petr Matyáš <pmatyas> |
| Component: | Attachments/Requests | Assignee: | PnT DevOps Devs <hss-ied-bugs> |
| Status: | CLOSED WORKSFORME | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.4 | CC: | huiwang, mtahir, pmatyas, qgong |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-07-10 09:32:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Petr Matyáš
2016-02-03 12:00:36 UTC
If you select "binary file" from the menu it sets the mime type to 'application/octet-stream' not 'binary/octet-stream'. 'binary/octet-stream' is for exactable binary files and we do not support attaching those.
If you select auto then it depends on what your browser is telling Bugzilla.
If your browser says the attachment is "application/octet-stream" then BZ will use File::MimeInfo to interrogate the file to determine it's mime type, which should be 'application/x-compressed-tar'.
If your browser says the attachment is anything else, Bugzilla trusts the browser and uses the supplied mime type.
So there are 3 possibilities here:
1: Your browser is telling BZ the mime type is 'binary/octet-stream' and BZ does the right things and says no.
2: Your browser is saying "application/octet-stream" and when BZ interrogates the file it has the wrong mime type and BZ does the right thing and says no.
3: Your browser is saying "application/octet-stream" and when BZ interrogates the file it has the right mime type and BZ does the wrong thing and says no.
We can only address number 3, but I'd need a tar ball that is triggering that as my tests work as expected.
$ perl -E 'use File::MimeInfo; say(mimetype("foo.tar.gz"));'
application/x-compressed-tar
Tested adding foo.tar.gz to partner BZ using Firefox 48.0.1 on Fedora 24 at https://partner-bugzilla.redhat.com/show_bug.cgi?id=1369550 detected as application/x-gzip which means Firefox is supplying a different mime type to what is in the file, but it's a valid alternative.
OK, so this works now, closing. |