Home » HTTP » HTTP_Download » Bug #3283
Use PEAR MIME_Type for guessContentType()
Details
| Request #3283 | Use PEAR MIME_Type for guessContentType() |
|---|---|
| Submitted | 2005-01-24 19:19 UTC |
| From | mail at philipp-wagner dot com |
| Assigned | mike |
| Status | Closed |
| Package | HTTP_Download |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-01-24 19:19 UTC] mail at philipp-wagner dot com
Description:
------------
The PEAR Package MIME_Type provides an autoDetect() method which allows the detection the mime-type of a file either by using ext/magic_mime or by using the 'file'-binary.
Also, magic_mime is deprecated, as the manual point out:
--- snip ---
This extension has been deprecated as the PECL extension fileinfo provides the same functionality (and more) in a much cleaner way.
--- snip ---
So it probably would be the best thing to use MIME_Type for detection and let it handle which ways to detect the mime type are available on the system.