|
|
|
@ -477,9 +477,9 @@ function rc_mime_content_type($path, $name, $failover = 'application/octet-strea
|
|
|
|
|
$mime_type = $failover;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// sometimes content-type contains charset definition,
|
|
|
|
|
// remove useless "charset=binary", should we remove any charset def. here?
|
|
|
|
|
$mime_type = preg_replace('/; charset=binary;*/i', '', $mime_type);
|
|
|
|
|
// Sometimes (PHP-5.3?) content-type contains charset definition,
|
|
|
|
|
// Remove it (#1487122) also "charset=binary" is useless
|
|
|
|
|
$mime_type = array_shift(preg_split('/[; ]/', $mime_type));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $mime_type;
|
|
|
|
|