PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Download » Bug #3283

Use PEAR MIME_Type for guessContentType()

Details

Request #3283Use PEAR MIME_Type for guessContentType()
Submitted2005-01-24 19:19 UTC
Frommail at philipp-wagner dot com
Assignedmike
StatusClosed
PackageHTTP_Download
PHP VersionIrrelevant
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.