Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 498671

Summary: file utility does not produce MIME type for XML files
Product: Red Hat Enterprise Linux 5 Reporter: Trevin Beattie <tbeattie>
Component: fileAssignee: Jan Kaluža <jkaluza>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: low Docs Contact:
Priority: low    
Version: 5.3CC: cww, ksrot, mmalik, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 05:45:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 590060    
Attachments:
Description Flags
mime type added none

Description Trevin Beattie 2009-05-01 19:42:33 UTC
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 13:20:11 UTC
Created attachment 406234 [details]
mime type added

Comment 4 RHEL Program Management 2010-08-09 18:26:13 UTC
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 Program Management 2011-01-11 20:39:17 UTC
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 Program Management 2011-01-11 22:33:49 UTC
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 Program Management 2011-05-31 13:28:31 UTC
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 09:39:32 UTC
    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 05:45:48 UTC
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