Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72538 invoked from network); 31 Oct 2013 23:51:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2013 23:51:29 -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:22942] helo=aserp1040.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/90-02760-FFCE2725 for ; Thu, 31 Oct 2013 18:51:28 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9VNpMpd012752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 31 Oct 2013 23:51:24 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9VNpLJJ027391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Oct 2013 23:51:22 GMT Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9VNpLOk009647; Thu, 31 Oct 2013 23:51:21 GMT Received: from hubby.local (/50.150.115.211) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 31 Oct 2013 16:51:20 -0700 Message-ID: <5272ECF8.2000602@oracle.com> Date: Thu, 31 Oct 2013 16:51:20 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Stas Malyshev , PHP internals References: <526ACC9B.4090204@oracle.com> <5272C51F.7090106@oracle.com> <5272E3E4.5030907@sugarcrm.com> In-Reply-To: <5272E3E4.5030907@sugarcrm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Subject: Re: [PHP-DEV] Adding new MIME types for the CLI web server From: christopher.jones@oracle.com (Christopher Jones) On 10/31/13 4:12 PM, Stas Malyshev wrote: > Hi! > >> Final comments anyone, before I commit next week? > > It looks strange that we have to hardcode so many mimetypes in the code, > and doesn't sound a scalable solution. Can't we make it use data from > fileinfo or some other customizeable table so we don't have to keep all > MIME types hardcoded in the code? Maybe some ability to use Apache's > mime.types file? > It isn't scalable, but users can always use a router script to add additional types so there isn't a real world problem in missing uncommon extensions. My idea was to add common extensions to the existing look-up list. A quick and straight-forward solution to making the CLI web-server handle the 80-20 rule. If someone (ajf?) wants to work on a more comprehensive solution instead, I have no objection. 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