Adding new MIME types for the CLI web server

From: Date: Fri, 25 Oct 2013 19:55:07 +0000
Subject: Adding new MIME types for the CLI web server
Groups: php.internals 
Request: Send a blank email to internals+get-69872@lists.php.net to get a copy of this message
I'm planning on adding some MIME type to the CLI web server. For PHP 5.5.5 CLI web server I added the .pdf MIME type. I was using the webserver for a conference exhibition hall demo and needed to present a PDF. Some other multi-media types could be useful in future situations, and in general. I'm thinking of adding these to PHP 5.5.6 & master:
       { "avi",  "video/x-msvideo" },
       { "flv",  "video/x-flv" },
       { "swf",  "application/x-shockwave-flash" },
       { "qt",   "video/quicktime" },
       { "mov",  "video/quicktime" },
       { "mp3",  "audio/mpeg" },
       { "mp4",  "video/mpeg" },
       { "mpg",  "video/mpeg" },
       { "mpeg", "video/mpeg" },
       { "wav",  "audio/wav" },
Notes: - A router can be used to add to, or override, the MIME type lookups, see http://php.net/manual/en/features.commandline.webserver.php - The web server code does a linear lookup through the MIME table, defaulting on failure to returning "application/octet-stream". -- christopher.jones@oracle.com http://twitter.com/ghrd Free PHP & Oracle book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html

« previous php.internals (#69872) next »