Ticket #1485296 (closed Patches: fixed)

Opened 3 months ago

Last modified 3 months ago

mime type detection not perfect 8)

Reported by: arekm Owned by:
Priority: 5 Milestone: 0.2-beta
Component: PHP backend Version: 0.2-alpha
Severity: normal Keywords:
Cc:

Description

Continuation of #1485222 improvements.

Unfortunately in meantime the code was changed that if finfo_file() fails then whole detection fails :-/

Wouldn't be it better to fallback to other mime detection type in such case?... and if that fails fallback to unknown/unknown.

--- program/include/rcube_shared.inc.org 2008-08-27 14:23:03.814146425 +0200 +++ program/include/rcube_shared.inc 2008-08-27 14:24:23.362054805 +0200 @@ -569,7 +569,7 @@

finfo_close($finfo);

}

}

- else if (function_exists('mime_content_type')) { + if (!$mime_type && function_exists('mime_content_type')) {

$mime_type = mime_content_type($path);

}

Change History

Changed 3 months ago by alec

  • component changed from Client Scripts to PHP backend
  • milestone changed from later to 0.2-beta

Changed 3 months ago by thomasb

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1707

Note: See TracTickets for help on using tickets.