Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sapi/cli/generate_mime_type_map.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

$additional_mime_maps = [
"map" => "application/json", // from commit: a0d62f08ae8cbebc88e5c92e08fca8d0cdc7309d
"jsm" => "application/javascript",
];

foreach($additional_mime_maps as $ext => $mime) {
Expand Down Expand Up @@ -69,7 +70,7 @@
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 ?>
Expand Down
17 changes: 10 additions & 7 deletions sapi/cli/mime_type_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -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" },
Expand Down Expand Up @@ -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" },
Expand All @@ -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" },
Expand Down Expand Up @@ -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" },
Expand All @@ -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" },
Expand Down Expand Up @@ -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 }
};

Expand Down