Bug 240844 - /etc/httpd/conf/magic is too simple (PNG is missing)
/etc/httpd/conf/magic is too simple (PNG is missing)
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2007-05-22 06:39 EDT by Milan Kerslager
Modified: 2009-09-02 07:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 07:49:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Milan Kerslager 2007-05-22 06:39:04 EDT
The /etc/httpd/conf/magic file is too short and too simple. This seems to be
better to use (longer and better) file /usr/share/file/magic.mime (from "file"

Also PHP is using Apache's magic file and this causes problems when using
MediaWiki and other appliactions, see:
Comment 1 Milan Kerslager 2007-05-22 06:54:26 EDT
PHP bug filled as bug #240845.

Please consider to use external MIME definition (by requiring "file" package and
by creating symlink from /etc/httpd/conf/magic to /usr/share/file/magic.mime) or
simply copy actual MIME file from package file to the Apache package (does not
sound good as this preserves MIME definition duplication).
Comment 2 RHEL Product and Program Management 2007-12-03 15:42:56 EST
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release.  This request will
be reviewed for a future Red Hat Enterprise Linux release.
Comment 3 RHEL Product and Program Management 2008-06-02 16:37:04 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 6 Joe Orton 2008-09-18 11:50:47 EDT
Having reviewed the mod_mime_magic code I'm no longer confident about making this change by default.  The httpd.conf already offers the alternative MIMEMagicFile as a commented-out example.  I'll change this in Fedora Raw Hide to get some wider testing of the use of the magic.mime from file(1).
Comment 8 Joe Orton 2009-06-22 05:39:28 EDT
On testing of this change, when configured to use /usr/share/file/magic.mime, mod_mime_magic will not even detect an HTML file correctly.

mod_mime_magic's magic-file parser is not grokking the newer-format mime files correctly.  I've modified the shipped conf/magic file to support image/png - even this had to use a simplified version of the PNG detection magic.

A better long-term goal might be to use libmagic directly from mod_mime_magic, though I haven't looked into that.
Comment 12 errata-xmlrpc 2009-09-02 07:49:58 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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