Re: Adding new MIME types for the CLI web server

From: Date: Sat, 26 Oct 2013 17:39:21 +0000
Subject: Re: Adding new MIME types for the CLI web server
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-69881@lists.php.net to get a copy of this message
Hi, Christopher Jones wrote: > I'm thinking of adding these to PHP 5.5.6 & master: > { "mp4", "video/mpeg" }, FYI that's not the correct mime type for mp4 - http://www.rfc-editor.org/rfc/rfc4337.txt The exact mime type depends on the content of the file, but 'video/mp4' would be more appropriate than 'video/mpeg'. cheers Dan On Fri, Oct 25, 2013 at 7:55 PM, Christopher Jones <christopher.jones@oracle.com> wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.internals (#69881) next »