Modified: trunk/htdocs/system/classes/utils.php (3879 => 3880)
--- trunk/htdocs/system/classes/utils.php 2009-12-13 05:14:06 UTC (rev 3879)
+++ trunk/htdocs/system/classes/utils.php 2009-12-13 19:58:27 UTC (rev 3880)
@@ -858,6 +858,12 @@
if ( function_exists('finfo_open') ) {
$finfo = finfo_open(FILEINFO_MIME);
$mimetype = finfo_file($finfo, $filename);
+ /* FILEINFO_MIME Returns the mime type and mime encoding as defined by RFC 2045.
+ * So only return the mime type, not the encoding.
+ */
+ if ( ( $pos = strpos($mimetype, ';') ) !== FALSE ) {
+ $mimetype = substr($mimetype, 0, $pos);
+ }
finfo_close($finfo);
}