Skip to content

Commit

Permalink
Update mime type generator script to keep track of additional mime-types
Browse files Browse the repository at this point in the history
  • Loading branch information
reeze committed Nov 15, 2015
1 parent 4bf3c14 commit 8222b97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions sapi/cli/generate_mime_type_map.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
}
});

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

foreach($additional_mime_maps as $ext => $mime) {
if (!isset($extensions[$ext])) {
$extensions[$ext] = $mime;
} else {
printf(STDERR, "Ignored exist mime type: $ext => $mime\n");
}
}

?>
/*
+----------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion sapi/cli/mime_type_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ static php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "ma", "application/mathematica" },
{ "nb", "application/mathematica" },
{ "mb", "application/mathematica" },
{ "map", "application/json" },
{ "mathml", "application/mathml+xml" },
{ "mbox", "application/mbox" },
{ "mscml", "application/mediaservercontrol+xml" },
Expand Down Expand Up @@ -1010,6 +1009,7 @@ static php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "movie", "video/x-sgi-movie" },
{ "smv", "video/x-smv" },
{ "ice", "x-conference/x-cooltalk" },
{ "map", "application/json" },
{ NULL, NULL }
};

Expand Down

0 comments on commit 8222b97

Please sign in to comment.