Description of problem: When trying to add an attachment of type tar.gz with auto-detect file type option, I get an error: The content type binary/octet-stream is invalid. Valid types must be of the form foo/bar where foo is one of application, audio, image, message, model, multipart, text, video and bar must not contain any special characters (such as "=", "?", ...). Version-Release number of selected component (if applicable): 4.4.11046.4 How reproducible: always Steps to Reproduce: 1. create tar.gz archive 2. try to add it to existing bug 3. set auto-detect file type 4. submit Actual results: error message Expected results: added attachment of type binary/octet stream Additional info:
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.