Subversion Repositories fileformats

Compare Revisions

Regard whitespace Rev 8 → Rev 9

/trunk/mimetype_lookup.inc.php
1,6 → 1,6
<?php
 
// Generated 2020-05-17 23:12:05
// Generated 2021-05-24 02:11:24
// Source: https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
 
$mime_types = array(
547,6 → 547,7
'opf' => 'application/oebps-package+xml',
'opml' => 'text/x-opml',
'oprc' => 'application/vnd.palm',
'opus' => 'audio/ogg',
'org' => 'application/vnd.lotus-organizer',
'osf' => 'application/vnd.yamaha.openscoreformat',
'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
758,7 → 759,6
'str' => 'application/vnd.pg.format',
'stw' => 'application/vnd.sun.xml.writer.template',
'sub' => 'image/vnd.dvb.subtitle',
'sub' => 'text/vnd.dvb.subtitle',
'sus' => 'application/vnd.sus-calendar',
'susp' => 'application/vnd.sus-calendar',
'sv4cpio' => 'application/x-sv4cpio',
901,7 → 901,6
'wmv' => 'video/x-ms-wmv',
'wmx' => 'video/x-ms-wmx',
'wmz' => 'application/x-ms-wmz',
'wmz' => 'application/x-msmetafile',
'woff' => 'font/woff',
'woff2' => 'font/woff2',
'wpd' => 'application/vnd.wordperfect',
/trunk/mimetype_lookup_generate.sh
6,13 → 6,17
function generateUpToDateMimeArray($url) {
// Based on https://www.php.net/manual/de/function.mime-content-type.php#107798 , modified
$s = array();
$dupcheck = array();
foreach (@explode("\n",@file_get_contents($url))as $x) {
if (isset($x[0])&&$x[0]!=='#'&&preg_match_all('#([^\s]+)#',$x,$out)&&isset($out[1])&&($c=count($out[1]))>1) {
for ($i=1;$i<$c;$i++) {
if (!isset($dupcheck[$out[1][$i]])) {
$s[] = "\t'".$out[1][$i]."' => '".$out[1][0]."'";
$dupcheck[$out[1][$i]] = true;
}
}
}
}
return @sort($s) ? "\$mime_types = array(\n".implode($s,",\n")."\n);" : false;
}