From d0cd1127024410bd7b055500d1bd879c4187b832 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 15 Nov 2013 12:36:25 -0800 Subject: [PATCH 1/2] This is CLI web server change. Added some common MIME types to the existing lookup list, pending a more thorough lookup solution, if anyone wants to do that. Ref http://news.php.net/php.internals/69990 A router can be used to add to, or override, the MIME type lookups, see http://php.net/manual/en/features.commandline.webserver.php --- NEWS | 3 +++ sapi/cli/php_cli_server.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/NEWS b/NEWS index 80e71670c72..f41d23bd50d 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2013, PHP 5.5.7 +- CLI server: + . Added some MIME types to the CLI web server (Chris Jones) + - readline . Fixed Bug #65714 (PHP cli forces the tty to cooked mode). (Remi) diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 1315a62b870..672111c5d63 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -275,6 +275,42 @@ static php_cli_server_ext_mime_type_pair mime_type_map[] = { { "webm", "video/webm" }, { "ogv", "video/ogg" }, { "ogg", "audio/ogg" }, + { "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" }, { NULL, NULL } }; From 81d0ba10bac7bd2c4820374931ad8862cc434800 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 15 Nov 2013 12:37:52 -0800 Subject: [PATCH 2/2] Update NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 445e85d18cb..5065d8f899b 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 20??, PHP 5.6.0 +- CLI server: + . Added some MIME types to the CLI web server (Chris Jones) + - Core: . Improved IS_VAR operands fetching. (Laruence, Dmitry) . Implemented internal operator overloading