Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69872 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92808 invoked from network); 25 Oct 2013 19:55:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2013 19:55:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=christopher.jones@oracle.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=christopher.jones@oracle.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain oracle.com designates 156.151.31.81 as permitted sender) X-PHP-List-Original-Sender: christopher.jones@oracle.com X-Host-Fingerprint: 156.151.31.81 userp1040.oracle.com Received: from [156.151.31.81] ([156.151.31.81:44249] helo=userp1040.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/A9-40084-1ACCA625 for ; Fri, 25 Oct 2013 15:55:14 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9PJt9ZR027575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 25 Oct 2013 19:55:10 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9PJt8tJ004472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Oct 2013 19:55:09 GMT Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9PJt8EY011838 for ; Fri, 25 Oct 2013 19:55:08 GMT Received: from [130.35.70.238] (/130.35.70.238) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 25 Oct 2013 12:55:08 -0700 Message-ID: <526ACC9B.4090204@oracle.com> Date: Fri, 25 Oct 2013 12:55:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: PHP internals Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: acsinet22.oracle.com [141.146.126.238] Subject: Adding new MIME types for the CLI web server From: christopher.jones@oracle.com (Christopher Jones) 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