Bug #67731 [NEW]: finfo::file() returns invalid mime type for binary files

From: Date: Thu, 31 Jul 2014 21:10:39 +0000
Subject: Bug #67731 [NEW]: finfo::file() returns invalid mime type for binary files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186918@lists.php.net to get a copy of this message
From: norbert at linuxnetworks dot de Operating system: travis-ci PHP version: 5.6.0RC2 Package: Filesystem function related Bug Type: Bug Bug description:finfo::file() returns invalid mime type for binary files Description: ------------ Compared to PHP 5.3 to 5.5, version 5.6RC2 returns a different mime type for binary files: "binary" instead of "application/octet-stream" Test script: --------------- $filename = '<name of binary file>'; $finfo = new finfo( FILEINFO_MIME_TYPE ); $mimetype = $finfo->file( $filename ); echo $mimetype . PHP_EOL; Expected result: ---------------- PHP 5.3, 5.4, 5.5: application/octet-stream Actual result: -------------- PHP 5.6RC2: binary (invalid as all mimetypes are "type/subtype") -- Edit bug report at https://bugs.php.net/bug.php?id=67731&edit=1 --

« previous php.bugs (#186918) next »