Bug 498671 - file utility does not produce MIME type for XML files
file utility does not produce MIME type for XML files
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: file (Show other bugs)
5.3
All Linux
low Severity low
: rc
: ---
Assigned To: Jan Kaluža
Milos Malik
:
Depends On:
Blocks: 590060
  Show dependency treegraph
 
Reported: 2009-05-01 15:42 EDT by Trevin Beattie
Modified: 2012-11-06 09:33 EST (History)
4 users (show)

See Also:
Fixed In Version: file-4.17-17
Doc Type: Bug Fix
Doc Text:
Cause: Mime-type definitions were missing in magic file for some XML patterns. Consequence: File was not able to detect mime-type of XML files. Fix: Mime-type defitiones for XML files has been added. Result: File now detects mime-types for XML files.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 00:45:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
mime type added (817 bytes, patch)
2010-04-13 09:20 EDT, Daniel Novotny
no flags Details | Diff

  None (edit)
Description Trevin Beattie 2009-05-01 15:42:33 EDT
Description of problem:
I'd like to use `file' in a script to determine the MIME type of arbitrary files uploaded by a user.  According to the man page I should be able to use "file -i filename".  It works for most files such as text/plain, text/html, image/png, and application/x-zip, but when I give it an .xml file it comes up blank.

Version-Release number of selected component (if applicable):
file-4.17-15

How reproducible:
Always.

Steps to Reproduce:
1. Find or create an XML file.  Simple test.xml:
   <?xml version="1.0" encoding="UTF-8"?></eof>
2. Run "file -i test.xml"

Actual results:
/tmp/test.xml: 

Expected results:
/tmp/test.xml: text/xml

Additional info:
Without the -i option, `file' does correctly identify the file as "XML 1.0 document text".  It just doesn't translate that into a MIME type.
Comment 1 Daniel Novotny 2010-04-13 09:20:11 EDT
Created attachment 406234 [details]
mime type added
Comment 4 RHEL Product and Program Management 2010-08-09 14:26:13 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 6 RHEL Product and Program Management 2011-01-11 15:39:17 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 7 RHEL Product and Program Management 2011-01-11 17:33:49 EST
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.
Comment 11 RHEL Product and Program Management 2011-05-31 09:28:31 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 17 Jan Kaluža 2012-01-05 04:39:32 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Mime-type definitions were missing in magic file for some XML patterns.

Consequence: File was not able to detect mime-type of XML files.

Fix: Mime-type defitiones for XML files has been added.

Result: File now detects mime-types for XML files.
Comment 18 errata-xmlrpc 2012-02-21 00:45:48 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0201.html

Note You need to log in before you can comment on or make changes to this bug.