Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69986 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60851 invoked from network); 31 Oct 2013 21:01:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2013 21:01:25 -0000 Authentication-Results: pb1.pair.com header.from=christopher.jones@oracle.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=christopher.jones@oracle.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain oracle.com designates 141.146.126.69 as permitted sender) X-PHP-List-Original-Sender: christopher.jones@oracle.com X-Host-Fingerprint: 141.146.126.69 aserp1040.oracle.com Received: from [141.146.126.69] ([141.146.126.69:36687] helo=aserp1040.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/A0-53648-425C2725 for ; Thu, 31 Oct 2013 16:01:24 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9VL1KGo022154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Oct 2013 21:01:21 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9VL1KQv023132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 31 Oct 2013 21:01:20 GMT Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9VL1KHF006859 for ; Thu, 31 Oct 2013 21:01:20 GMT Received: from [130.35.70.238] (/130.35.70.238) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 31 Oct 2013 14:01:19 -0700 Message-ID: <5272C51F.7090106@oracle.com> Date: Thu, 31 Oct 2013 14:01:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: PHP internals References: <526ACC9B.4090204@oracle.com> In-Reply-To: <526ACC9B.4090204@oracle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: acsinet21.oracle.com [141.146.126.237] Subject: Re: [PHP-DEV] Adding new MIME types for the CLI web server From: christopher.jones@oracle.com (Christopher Jones) On 10/25/2013 12:55 PM, Christopher Jones 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". > I had feedback from one person who suggested adding these: { "3gp", "video/3gpp" }, //This is standard video format used for MMS in phones { "apk", "application/vnd.android.package-archive" }, { "avi", "video/x-msvideo" }, { "bmp", "image/x-ms-bmp" }, { "csv", "text/comma-separated-values" }, { "doc", "application/msword" }, { "docx", "application/msword" }, { "flac", "audio/flac" }, { "gz", "application/x-gzip" }, { "gzip", "application/x-gzip" }, { "ics", "text/calendar" }, { "kml", "application/vnd.google-earth.kml+xml" }, { "kmz", "application/vnd.google-earth.kmz" }, { "m4a", "audio/mp4" }, { "mp3", "audio/mpeg" }, { "mp4", "video/mp4" }, { "mpg", "video/mpeg" }, { "mpeg", "video/mpeg" }, { "mov", "video/quicktime" }, { "odp", "application/vnd.oasis.opendocument.presentation" }, { "ods", "application/vnd.oasis.opendocument.spreadsheet" }, { "odt", "application/vnd.oasis.opendocument.text" }, { "oga", "audio/ogg" }, { "pdf", "application/pdf" }, { "pptx", "application/vnd.ms-powerpoint" }, { "pps", "application/vnd.ms-powerpoint" }, { "qt", "video/quicktime" }, { "swf", "application/x-shockwave-flash" }, { "tar", "application/x-tar" }, { "text", "text/plain" }, { "tif", "image/tiff" }, { "wav", "audio/wav" }, { "wmv", "video/x-ms-wmv" }, { "xls", "application/vnd.ms-excel" }, { "xlsx", "application/vnd.ms-excel" }, { "zip", "application/x-zip-compressed" The PHP CLI web server 5.5 currrently supports these MIME types natively: { "html", "text/html" }, { "htm", "text/html" }, { "js", "text/javascript" }, { "css", "text/css" }, { "gif", "image/gif" }, { "jpg", "image/jpeg" }, { "jpeg", "image/jpeg" }, { "jpe", "image/jpeg" }, { "png", "image/png" }, { "svg", "image/svg+xml" }, { "txt", "text/plain" }, { "webm", "video/webm" }, { "ogv", "video/ogg" }, { "ogg", "audio/ogg" }, Final comments anyone, before I commit next week? Chris -- 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