summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2018-06-19 16:50:16 -0700
committerStanislav Malyshev <stas@php.net>2018-06-19 16:50:16 -0700
commit3346659f2a2e835a591e003ba157eb9574cda523 (patch)
tree167000bd93241ec948c1f1d2582d08924ad08813 /sapi/cli
parentf61e1d28fe5d520ae2a124c87ef95b1d09ffac64 (diff)
parent57e72dc198dd527e209ce189bd0523775b281b48 (diff)
downloadphp-git-3346659f2a2e835a591e003ba157eb9574cda523.tar.gz
Merge branch 'pull-request/3274'
* pull-request/3274: Added const modifier 76363: added jsm extension to list of mime types
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/generate_mime_type_map.php3
-rw-r--r--sapi/cli/mime_type_map.h17
2 files changed, 12 insertions, 8 deletions
diff --git a/sapi/cli/generate_mime_type_map.php b/sapi/cli/generate_mime_type_map.php
index 13ae59dc0c..0cea031e37 100644
--- a/sapi/cli/generate_mime_type_map.php
+++ b/sapi/cli/generate_mime_type_map.php
@@ -29,6 +29,7 @@ array_walk($types, function ($line) use (&$extensions) {
$additional_mime_maps = [
"map" => "application/json", // from commit: a0d62f08ae8cbebc88e5c92e08fca8d0cdc7309d
+ "jsm" => "application/javascript",
];
foreach($additional_mime_maps as $ext => $mime) {
@@ -69,7 +70,7 @@ typedef struct php_cli_server_ext_mime_type_pair {
const char *mime_type;
} php_cli_server_ext_mime_type_pair;
-static php_cli_server_ext_mime_type_pair mime_type_map[] = {
+static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
<?php foreach ($extensions as $extension => $mime): ?>
{ "<?= addcslashes($extension, "\0..\37!@\@\177..\377") ?>", "<?= addcslashes($mime, "\0..\37!@\@\177..\377") ?>" },
<?php endforeach ?>
diff --git a/sapi/cli/mime_type_map.h b/sapi/cli/mime_type_map.h
index 904ef86a20..2b880b4c7f 100644
--- a/sapi/cli/mime_type_map.h
+++ b/sapi/cli/mime_type_map.h
@@ -635,16 +635,12 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "bdf", "application/x-font-bdf" },
{ "gsf", "application/x-font-ghostscript" },
{ "psf", "application/x-font-linux-psf" },
- { "otf", "application/x-font-otf" },
{ "pcf", "application/x-font-pcf" },
{ "snf", "application/x-font-snf" },
- { "ttf", "application/x-font-ttf" },
- { "ttc", "application/x-font-ttf" },
{ "pfa", "application/x-font-type1" },
{ "pfb", "application/x-font-type1" },
{ "pfm", "application/x-font-type1" },
{ "afm", "application/x-font-type1" },
- { "woff", "application/font-woff" },
{ "arc", "application/x-freearc" },
{ "spl", "application/x-futuresplash" },
{ "gca", "application/x-gca-compressed" },
@@ -758,6 +754,7 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "midi", "audio/midi" },
{ "kar", "audio/midi" },
{ "rmi", "audio/midi" },
+ { "m4a", "audio/mp4" },
{ "mp4a", "audio/mp4" },
{ "mpga", "audio/mpeg" },
{ "mp2", "audio/mpeg" },
@@ -804,6 +801,11 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "cml", "chemical/x-cml" },
{ "csml", "chemical/x-csml" },
{ "xyz", "chemical/x-xyz" },
+ { "ttc", "font/collection" },
+ { "otf", "font/otf" },
+ { "ttf", "font/ttf" },
+ { "woff", "font/woff" },
+ { "woff2", "font/woff2" },
{ "bmp", "image/bmp" },
{ "cgm", "image/cgm" },
{ "g3", "image/g3fax" },
@@ -825,9 +827,9 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "uvvi", "image/vnd.dece.graphic" },
{ "uvg", "image/vnd.dece.graphic" },
{ "uvvg", "image/vnd.dece.graphic" },
- { "sub", "text/vnd.dvb.subtitle" },
{ "djvu", "image/vnd.djvu" },
{ "djv", "image/vnd.djvu" },
+ { "sub", "text/vnd.dvb.subtitle" },
{ "dwg", "image/vnd.dwg" },
{ "dxf", "image/vnd.dxf" },
{ "fbs", "image/vnd.fastbidsheet" },
@@ -917,8 +919,8 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "vcard", "text/vcard" },
{ "curl", "text/vnd.curl" },
{ "dcurl", "text/vnd.curl.dcurl" },
- { "scurl", "text/vnd.curl.scurl" },
{ "mcurl", "text/vnd.curl.mcurl" },
+ { "scurl", "text/vnd.curl.scurl" },
{ "fly", "text/vnd.fly" },
{ "flx", "text/vnd.fmi.flexstor" },
{ "gv", "text/vnd.graphviz" },
@@ -941,10 +943,10 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "f77", "text/x-fortran" },
{ "f90", "text/x-fortran" },
{ "java", "text/x-java-source" },
+ { "nfo", "text/x-nfo" },
{ "opml", "text/x-opml" },
{ "p", "text/x-pascal" },
{ "pas", "text/x-pascal" },
- { "nfo", "text/x-nfo" },
{ "etx", "text/x-setext" },
{ "sfv", "text/x-sfv" },
{ "uu", "text/x-uuencode" },
@@ -1010,6 +1012,7 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "smv", "video/x-smv" },
{ "ice", "x-conference/x-cooltalk" },
{ "map", "application/json" },
+ { "jsm", "application/javascript" },
{ NULL, NULL }
};