#48885 [Opn->Bgs]: finfo returns mime type + charset when FILEINFO_MIME is used

From: Date: Sat, 11 Jul 2009 20:44:08 +0000
Subject: #48885 [Opn->Bgs]: finfo returns mime type + charset when FILEINFO_MIME is used
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-139629@lists.php.net to get a copy of this message
 ID:               48885
 Updated by:       scottmac@php.net
 Reported By:      majkl578 at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Linux Debian
 PHP Version:      5.3.0
 New Comment:

This is correct, rfc2045 requires the character set to be there for
mime type.


Previous Comments:
------------------------------------------------------------------------

[2009-07-11 12:46:42] majkl578 at gmail dot com

Description:
------------
When finfo is used with FILEINFO_MIME flag for a file, it returns mime
type + charset (in this format: mime/type; charset=foo


Configure Command:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysql'
'--with-mysqli' '--with-curl' '--with-sqlite' '--with-gd'
'--enable-mbstring' '--with-openssl' '--disable-short-tags'
'--with-mcrypt' '--with-bz2' '--with-zlib' '--enable-zip' 

Reproduce code:
---------------
$obj = new \finfo(FILEINFO_MIME);
echo $obj->file('/tmp/phpbug'); //in file is plain text

Expected result:
----------------
text/plain

Actual result:
--------------
text/plain; charset=us-ascii


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48885&edit=1



Thread (16 messages)

« previous php.bugs (#139629) next »