#33829 [NEW]: mime_content_type() returns text/plain for gzip and bzip files
From: mschering at intermesh dot nl
Operating system: Linux (Debian)
PHP version: 4.3.11
PHP Bug Type: Filesystem function related
Bug description: mime_content_type() returns text/plain for gzip and bzip files
Description:
------------
mime_content_type() returns text/plain for gzip and bzip files.
I guess this function looks the type up in /etc/mime.types.
The extensions are not in there and should bot be in there.The comments in
the file say:
Note: Compression schemes like "gzip", "bzip", and "compress" are
notactually "mime-types". They are "encodings" and hence must _not_ have
entries in this file to map their extensions. The "mime-type" of an
encoded file refers to the type of data that has been encoded, not the
type of encoding.
My Mail application relies on this function for attaching files from the
filesystem. With this kind of files it failes.
Please fix this.
Reproduce code:
---------------
run mime_content_type on a *.tar.gz file.
Expected result:
----------------
return application/gzip or something like that
Actual result:
--------------
returns text/plain
--
Edit bug report at http://bugs.php.net/?id=33829&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33829&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33829&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33829&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33829&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33829&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33829&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33829&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33829&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33829&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33829&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33829&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33829&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33829&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33829&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33829&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33829&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33829&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33829&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33829&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33829&r=mysqlcfg
Thread (6 messages)
- mschering at intermesh dot nl