mime/ 0000755 0001762 0000144 00000000000 14766101762 011213 5 ustar ligges users mime/tests/ 0000755 0001762 0000144 00000000000 14766076662 012367 5 ustar ligges users mime/tests/mime.R 0000644 0001762 0000144 00000000134 14766076662 013437 0 ustar ligges users stopifnot(
mime::guess_type('Makefile', empty = 'text/x-makefile') == 'text/x-makefile'
)
mime/MD5 0000644 0001762 0000144 00000001225 14766101762 011523 0 ustar ligges users ba1fd7c087b248d29257f0a4e8a8ba36 *DESCRIPTION
6c0844d0f403d7b8220f569b9abb1fe5 *NAMESPACE
31bb6167268b118af6804d52c3a0cda3 *R/mime.R
e673c02fb9e72bd64d63a416b624789e *R/mimeextra.R
503e05ef394895830166cc5ae75ea95f *R/mimemap.R
d52a4549f88e3baab8df12cc81103327 *R/parse.R
06a764584808381ff8d4bc97b3235665 *README.md
d7aee0b63aca5a1ac343e0c15850ae80 *inst/NEWS.Rd
b65d1efec8ba3611b584140a7aea71aa *man/guess_type.Rd
6f404c9e36fb85fb15523332a70b8ce8 *man/mimemap.Rd
9e5f67c46afe2e9d6b3b10021273bf92 *man/parse_multipart.Rd
7ac2a343553fd78681382b578acfe057 *src/init.c
30b45730af99e45340a3f8d6723d6f0b *src/rawmatch.c
7fe5cdfaa00ec7d6af8c44921cecb3ac *tests/mime.R
mime/R/ 0000755 0001762 0000144 00000000000 14766076662 011426 5 ustar ligges users mime/R/parse.R 0000644 0001762 0000144 00000021001 14766076662 012655 0 ustar ligges users ## Rook::Utils$parse() has a few problems: 1. it adds an extra \r\n to the file
## uploaded; 2. if there are multiple files uploaded, only the info about the
## last file is recorded. Besides, I did not escape non-file data, nor did I
## unescape the filenames. The former is not important to me at the moment,
## since the primary purpose of this function is for shiny IE8/9 file uploading;
## the latter is probably not important, either, since the users normally only
## want the content of the file(s) instead of the name(s).
#' Parse multipart form data
#'
#' This function parses the HTML form data from a Rook environment (an HTTP POST
#' request).
#' @param env the HTTP request environment
#' @return A named list containing the values of the form data, and the files
#' uploaded are saved to temporary files (the temporary filenames are
#' returned). It may also be `NULL` if there is anything unexpected in the
#' form data, or the form is empty.
#' @references This function was borrowed from
#' with slight modifications.
#' @export
#' @useDynLib mime, .registration = TRUE
parse_multipart = function(env) {
ctype = env$CONTENT_TYPE
if (length(grep('^multipart', ctype)) == 0L) return()
EOL = '\r\n'
params = list()
input = env$rook.input; input$rewind()
content_length = as.integer(env$CONTENT_LENGTH)
# some constants regarding boundaries
boundary = gsub('^multipart/.*boundary="?([^";,]+)"?', '--\\1', ctype)
bytesize = function(x) nchar(x, type = 'bytes')
EOL_size = bytesize(EOL)
EOL_raw = charToRaw(EOL)
boundary_size = bytesize(boundary)
boundaryEOL = paste(boundary, EOL, sep = '')
boundaryEOL_size = boundary_size + bytesize(EOL)
boundaryEOL_raw = charToRaw(boundaryEOL)
EOLEOL = paste(EOL, EOL, sep = '')
EOLEOL_size = bytesize(EOLEOL)
EOLEOL_raw = charToRaw(EOLEOL)
buf = new.env(parent = emptyenv())
buf$bufsize = 16384L # never read more than bufsize bytes (16K)
buf$read_buffer = input$read(boundaryEOL_size)
buf$read_buffer_len = length(buf$read_buffer)
buf$unread = content_length - boundary_size
if (!identical(boundaryEOL_raw, buf$read_buffer)) {
warning('bad content body')
input$rewind()
return()
}
# read the smaller one of the unread content and the next chunk
fill_buffer = function() {
x = input$read(min(buf$bufsize, buf$unread))
n = length(x)
if (n == 0L) return()
buf$read_buffer = c(buf$read_buffer, x)
buf$read_buffer_len = length(buf$read_buffer)
buf$unread = buf$unread - n
}
# slices off the beginning part of read_buffer, e.g. i is the position of
# EOLEOL, and size is EOLEOL_size, and read_buffer is [......EOLEOL+++], then
# slice_buffer returns the the beginning [......], and turns read_buffer to
# the remaining [+++]
slice_buffer = function(i, size) {
slice = buf$read_buffer[if (i > 1) 1:(i - 1) else 1]
buf$read_buffer = if ((i+size) <= buf$read_buffer_len)
buf$read_buffer[(i + size):buf$read_buffer_len] else raw()
buf$read_buffer_len = length(buf$read_buffer)
slice
}
# prime the read_buffer
buf$read_buffer = raw()
fill_buffer()
# find the position of the raw vector x1 in x2
raw_match = function(x1, x2) {
if (is.character(x1)) x1 = charToRaw(x1)
.Call('rawmatch', x1, x2, PACKAGE = 'mime')
}
unescape = function(x) {
unlist(lapply(x, function(s) utils::URLdecode(chartr('+', ' ', s))))
}
while (TRUE) {
head = value = NULL
filename = content_type = name = NULL
while (is.null(head)) {
i = raw_match(EOLEOL_raw, buf$read_buffer)
if (length(i)) {
head = slice_buffer(i, EOLEOL_size)
break
} else if (buf$unread) {
fill_buffer()
} else {
break # we've read everything and still haven't seen a valid head
}
}
if (is.null(head)) {
warning('Bad post payload: searching for a header')
input$rewind()
return()
}
# cat('Head:',rawToChar(head),'\n') they're 8bit clean
head = rawToChar(head)
token = '[^\\s()<>,;:\\"\\/\\[\\]?=]+'
condisp = sprintf('Content-Disposition:\\s*%s\\s*', token)
dispparm = sprintf(';\\s*(%s)=("(?:\\"|[^"])*"|%s)*', token, token)
rfc2183 = sprintf('(?m)^%s(%s)+$', condisp, dispparm)
broken_quoted = sprintf(
'(?m)^%s.*;\\sfilename="(.*?)"(?:\\s*$|\\s*;\\s*%s=)', condisp, token
)
broken_unquoted = sprintf('(?m)^%s.*;\\sfilename=(%s)', condisp, token)
if (length(grep(rfc2183, head, perl = TRUE))) {
first_line = sub(condisp, '', strsplit(head, EOL)[[1L]][1], perl = TRUE)
pairs = strsplit(first_line, ';', fixed = TRUE)[[1L]]
fnmatch = '\\s*filename=(.*)\\s*'
if (any(grepl(fnmatch, pairs, perl = TRUE))) {
filename = pairs[grepl(fnmatch, pairs, perl = TRUE)][1]
filename = gsub('"', '', sub(fnmatch, '\\1', filename, perl = TRUE))
}
} else if (length(grep(broken_quoted, head, perl = TRUE))) {
filename = sub(
broken_quoted, '\\1', strsplit(head, '\r\n')[[1L]][1], perl = TRUE
)
} else if (length(grep(broken_unquoted, head, perl = TRUE))) {
filename = sub(
broken_unquoted, '\\1', strsplit(head, '\r\n')[[1L]][1], perl = TRUE
)
}
# TODO: decoding filenames seems to be a mess here; skip it for now
# if (!is.null(filename) && filename != '') {
# filename = unescape(filename)
# }
headlines = strsplit(head, EOL, fixed = TRUE)[[1L]]
content_type_re = '(?mi)Content-Type: (.*)'
content_types = grep(content_type_re, headlines, perl = TRUE, value = TRUE)
if (length(content_types)) {
content_type = sub(content_type_re, '\\1', content_types[1], perl = TRUE)
}
name = sub(
'(?si)Content-Disposition:.*\\s+name="?([^\";]*).*"?', '\\1', head,
perl = TRUE
)
while (TRUE) {
i = raw_match(boundary, buf$read_buffer)
if (length(i)) {
value = slice_buffer(i, boundary_size)
# strip off the extra EOL before the boundary
if (identical(tail(value, EOL_size), EOL_raw))
value = head(value, -EOL_size)
if (length(value)) {
# drop EOL only values
if (identical(value, EOL_raw)) break
if (!is.null(filename) || !is.null(content_type)) {
data = list()
data$name = if (is.null(filename)) NA_character_ else filename
data$size = length(value)
data$type = if (is.null(content_type)) NA_character_ else content_type
data$datapath = tempfile()
con = file(data$datapath, open = 'wb')
tryCatch(writeBin(value, con), finally = close(con))
params[[name]] = rbind(params[[name]], as.data.frame(data, stringsAsFactors = FALSE))
} else {
len = length(value)
# trim trailing EOL
if (len > 2 && length(raw_match(EOL, value[(len - 1):len])))
len = len - 2
# handle array parameters (TODO: why Utils$escape?)
paramValue = rawToChar(value[1:len])
paramSet = FALSE
if (grepl('\\[\\]$', name)) {
name = sub('\\[\\]$', '', name)
if (name %in% names(params)) {
params[[name]] = c(params[[name]], paramValue)
paramSet = TRUE
}
}
if (!paramSet) params[[name]] = paramValue
}
}
break
} else if (buf$unread) {
fill_buffer()
} else {
break # we've read everything and still haven't seen a valid value
}
}
if (is.null(value)) {
# bad post payload
input$rewind()
warning('Bad post payload: searching for a body part')
return(NULL)
}
# now search for ending markers or the beginning of another part
while (buf$read_buffer_len < 2 && buf$unread) fill_buffer()
if (buf$read_buffer_len < 2 && buf$unread == 0) {
# bad stuff at the end; just return what we've got and presume everything
# is okay
input$rewind()
return(params)
}
# valid ending
if (length(raw_match('--', buf$read_buffer[1:2]))) {
input$rewind()
return(params)
}
# skip past the EOL.
if (length(raw_match(EOL, buf$read_buffer[1:EOL_size]))) {
slice_buffer(1, EOL_size)
} else {
warning('Bad post body: EOL not present')
input$rewind()
return(params)
}
# another sanity check before we try to parse another part
if ((buf$read_buffer_len + buf$unread) < boundary_size) {
warning('Bad post body: unknown trailing bytes')
input$rewind()
return(params)
}
}
}
mime/R/mimeextra.R 0000644 0001762 0000144 00000000262 14766076662 013544 0 ustar ligges users mimeextra = c(
jsonp = "application/javascript",
r = "text/plain",
rd = "text/plain",
rmd = "text/x-markdown",
rnw = "text/x-sweave",
rproj = "text/rstudio",
scss = "text/css"
)
mime/R/mime.R 0000644 0001762 0000144 00000006260 14766076662 012504 0 ustar ligges users #' @import utils
NULL
#' Tables for mapping filename extensions to MIME types
#'
#' The data `mimemap` is a named character vector that stores the filename
#' extensions and the corresponding MIME types, e.g. `c(html = 'text/html', pdf
#' = 'application/pdf', ...)`. The character vector `mime:::mimeextra` stores
#' some additional types that we know, such as Markdown files (`.md`), or R
#' scripts (`.R`).
#' @docType data
#' @usage NULL
#' @format NULL
#' @source The file `/etc/mime.types` on Debian.
#' @export
#' @examples str(as.list(mimemap))
#' mimemap['pdf']
#' mimemap[c('html', 'js', 'css')]
#' # additional MIME types (not exported)
#' mime:::mimeextra
'mimemap'
#' Guess the MIME types from filenames
#'
#' Look up in the [`mimemap`] table for the MIME types based on the extensions of
#' the given filenames.
#' @param file a character vector of filenames, or filename extensions
#' @param unknown the MIME type to return when the file extension was not found
#' in the table
#' @param empty the MIME type for files that do not have extensions
#' @param mime_extra a named character vector of the form `c(extension = type)`
#' providing extra MIME types (by default, `mime:::mimeextra`); note this MIME
#' table takes precedence over the standard table [`mimemap`]
#' @param subtype a character vector of MIME subtypes, which should be of the
#' same length as `file` if provided (use an empty character string for a file
#' if we do not want a subtype for it)
#' @examples
#' library(mime)
#' # well-known file types
#' guess_type(c('a/b/c.html', 'd.pdf', 'e.odt', 'foo.docx', 'tex'))
#' # not in the standard table, but in mimeextra
#' guess_type(c('a.md', 'b.R'), mime_extra = NULL)
#' guess_type(c('a.md', 'b.R'))
#'
#' # override the standard MIME table (tex is text/x-tex by default)
#' guess_type('tex', mime_extra = c(tex = 'text/plain'))
#' # unknown extension 'zzz'
#' guess_type('foo.zzz')
#' # force unknown types to be plain text
#' guess_type('foo.zzz', unknown = 'text/plain')
#'
#' # empty file extension
#' guess_type('Makefile')
#' # we know it is a plain text file
#' guess_type('Makefile', empty = 'text/plain')
#'
#' # subtypes
#' guess_type(c('abc.html', 'def.htm'), subtype = c('charset=UTF-8', ''))
#' @export
guess_type = function(file, unknown = 'application/octet-stream',
empty = 'text/plain', mime_extra = mimeextra, subtype = '') {
# TODO: remove this workaround
if ('RestRserve' %in% loadedNamespaces() && packageVersion('RestRserve') <= '1.2.4')
mimemap['js'] = 'application/javascript'
file = basename(file)
# only need 'bar' from 'foo.bar'
file = tools::file_ext(file)
type = unname(c(mime_extra, mimemap)[tolower(file)])
type[file == ''] = empty
type[is.na(type)] = unknown # unknown file extensions
if (any(i <- subtype != '')) {
if (length(type) != length(file))
stop("'subtype' must be of the same length as 'file'")
type[i] = paste(type[i], subtype[i], sep = '; ')
}
type
}
if (.Platform$OS.type == 'windows') basename = function(path) {
if (length(path) == 0) return(path)
tryCatch(base::basename(path), error = function(e) {
vapply(strsplit(path, '[\\/]+'), tail, character(1), 1, USE.NAMES = FALSE)
})
}
mime/R/mimemap.R 0000644 0001762 0000144 00000147134 14766076662 013210 0 ustar ligges users mimemap = c(
`%` = "application/x-trash",
`~` = "application/x-trash",
`123` = "application/vnd.lotus-1-2-3",
`1905.1` = "application/vnd.ieee.1905",
`1clr` = "application/clr",
`1km` = "application/vnd.1000minds.decision-model+xml",
`210` = "application/p21",
`3dm` = "text/vnd.in3d.3dml",
`3dml` = "text/vnd.in3d.3dml",
`3mf` = "application/vnd.ms-3mfdocument",
`3tz` = "application/vnd.maxar.archive.3tz+zip",
`726` = "audio/32kadpcm",
`7z` = "application/x-7z-compressed",
a = "text/vnd.a",
a2l = "application/A2L",
aa3 = "audio/ATRAC3",
aac = "audio/aac",
aal = "audio/ATRAC-ADVANCED-LOSSLESS",
abc = "text/vnd.abc",
abw = "application/x-abiword",
ac = "application/pkix-attr-cert",
ac2 = "application/vnd.banana-accounting",
ac3 = "audio/ac3",
acc = "application/vnd.americandynamics.acc",
acn = "audio/asc",
acu = "application/vnd.acucobol",
acutc = "application/vnd.acucorp",
adts = "audio/aac",
aep = "application/vnd.audiograph",
afp = "application/vnd.afpc.modca",
age = "application/vnd.age",
ahead = "application/vnd.ahead.space",
ai = "application/postscript",
aif = "audio/x-aiff",
aifc = "audio/x-aiff",
aiff = "audio/x-aiff",
aion = "application/vnd.veritone.aion+json",
ait = "application/vnd.dvb.ait",
alc = "chemical/x-alchemy",
ami = "application/vnd.amiga.ami",
aml = "application/AML",
amlx = "application/automationml-amlx+zip",
amr = "audio/AMR",
AMR = "audio/AMR",
anx = "application/annodex",
apex = "application/vnd.apexlang",
apexlang = "application/vnd.apexlang",
apk = "application/vnd.android.package-archive",
apkg = "application/vnd.anki",
apng = "image/apng",
appcache = "text/cache-manifest",
apr = "application/vnd.lotus-approach",
apxml = "application/auth-policy+xml",
arrow = "application/vnd.apache.arrow.file",
arrows = "application/vnd.apache.arrow.stream",
art = "image/x-jg",
artisan = "application/vnd.artisan+json",
asc = "application/pgp-keys",
ascii = "text/vnd.ascii-art",
asf = "application/vnd.ms-asf",
asice = "application/vnd.etsi.asic-e+zip",
asics = "application/vnd.etsi.asic-s+zip",
asn = "chemical/x-ncbi-asn1",
aso = "application/vnd.accpac.simply.aso",
ass = "audio/aac",
at3 = "audio/ATRAC3",
atc = "application/vnd.acucorp",
atf = "application/ATF",
atfx = "application/ATFX",
atom = "application/atom+xml",
atomcat = "application/atomcat+xml",
atomdeleted = "application/atomdeleted+xml",
atomsrv = "application/atomserv+xml",
atomsvc = "application/atomsvc+xml",
atx = "audio/ATRAC-X",
atxml = "application/ATXML",
au = "audio/basic",
auc = "application/tamp-apex-update-confirm",
avci = "image/avci",
avcs = "image/avcs",
avi = "video/x-msvideo",
avif = "image/avif",
awb = "audio/AMR-WB",
AWB = "audio/AMR-WB",
axa = "audio/annodex",
axv = "video/annodex",
azf = "application/vnd.airzip.filesecure.azf",
azs = "application/vnd.airzip.filesecure.azs",
azv = "image/vnd.airzip.accelerator.azv",
azw3 = "application/vnd.amazon.mobi8-ebook",
b = "chemical/x-molconn-Z",
b16 = "image/vnd.pco.b16",
bak = "application/x-trash",
bar = "application/vnd.qualcomm.brew-app-res",
bary = "model/vnd.bary",
bat = "application/x-msdos-program",
bcpio = "application/x-bcpio",
bdm = "application/vnd.syncml.dm+wbxml",
bed = "application/vnd.realvnc.bed",
bh2 = "application/vnd.fujitsu.oasysprs",
bib = "text/x-bibtex",
bik = "video/vnd.radgamettools.bink",
bin = "application/octet-stream",
bk2 = "video/vnd.radgamettools.bink",
bkm = "application/vnd.nervana",
bmed = "multipart/vnd.bint.med-plus",
bmi = "application/vnd.bmi",
bmml = "application/vnd.balsamiq.bmml+xml",
bmp = "image/bmp",
bmpr = "application/vnd.balsamiq.bmpr",
boo = "text/x-boo",
book = "application/x-maker",
box = "application/vnd.previewsystems.box",
bpd = "application/vnd.hbci",
brf = "text/plain",
bsd = "chemical/x-crossfire",
bsp = "model/vnd.valve.source.compiled-map",
btf = "image/prs.btif",
btif = "image/prs.btif",
c = "text/x-csrc",
`c++` = "text/x-c++src",
c11amc = "application/vnd.cluetrust.cartomobile-config",
c11amz = "application/vnd.cluetrust.cartomobile-config-pkg",
c3d = "chemical/x-chem3d",
c3ex = "application/cccex",
c4d = "application/vnd.clonk.c4group",
c4f = "application/vnd.clonk.c4group",
c4g = "application/vnd.clonk.c4group",
c4p = "application/vnd.clonk.c4group",
c4u = "application/vnd.clonk.c4group",
c9r = "application/vnd.cryptomator.encrypted",
c9s = "application/vnd.cryptomator.encrypted",
cab = "application/vnd.ms-cab-compressed",
cac = "chemical/x-cache",
cache = "chemical/x-cache",
cap = "application/vnd.tcpdump.pcap",
car = "application/vnd.ipld.car",
carjson = "application/vnd.eu.kasparian.car+json",
cascii = "chemical/x-cactvs-binary",
cat = "application/vnd.ms-pki.seccat",
cbin = "chemical/x-cactvs-binary",
cbor = "application/cbor",
cbr = "application/vnd.comicbook-rar",
cbz = "application/vnd.comicbook+zip",
cc = "text/x-c++src",
ccc = "text/vnd.net2phone.commcenter.command",
ccmp = "application/ccmp+xml",
ccxml = "application/ccxml+xml",
cda = "application/x-cdf",
cdbcmsg = "application/vnd.contact.cmsg",
cdf = "application/x-cdf",
cdfx = "application/CDFX+XML",
cdkey = "application/vnd.mediastation.cdkey",
cdmia = "application/cdmi-capability",
cdmic = "application/cdmi-container",
cdmid = "application/cdmi-domain",
cdmio = "application/cdmi-object",
cdmiq = "application/cdmi-queue",
cdr = "image/x-coreldraw",
cdt = "image/x-coreldrawtemplate",
cdx = "chemical/x-cdx",
cdxml = "application/vnd.chemdraw+xml",
cdy = "application/vnd.cinderella",
cea = "application/CEA",
cef = "chemical/x-cxf",
cellml = "application/cellml+xml",
cer = "application/pkix-cert",
cgm = "image/cgm",
chm = "application/vnd.ms-htmlhelp",
chrt = "application/vnd.kde.kchart",
cif = "application/vnd.multiad.creator.cif",
cii = "application/vnd.anser-web-certificate-issue-initiation",
cil = "application/vnd.ms-artgalry",
cl = "application/simple-filter+xml",
cla = "application/vnd.claymore",
class = "application/java-vm",
cld = "model/vnd.cld",
clkk = "application/vnd.crick.clicker.keyboard",
clkp = "application/vnd.crick.clicker.palette",
clkt = "application/vnd.crick.clicker.template",
clkw = "application/vnd.crick.clicker.wordbank",
clkx = "application/vnd.crick.clicker",
cls = "text/x-tex",
clue = "application/clue_info+xml",
cmc = "application/vnd.cosmocaller",
cmdf = "chemical/x-cmdf",
cml = "application/cellml+xml",
cmp = "application/vnd.yellowriver-custom-menu",
cmsc = "application/cms",
cnd = "text/jcr-cnd",
cod = "application/vnd.rim.cod",
coffee = "application/vnd.coffeescript",
com = "application/x-msdos-program",
copyright = "text/vnd.debian.copyright",
coswid = "application/swid+cbor",
cpa = "chemical/x-compass",
cpio = "application/x-cpio",
cpkg = "application/vnd.xmpie.cpkg",
cpl = "application/cpl+xml",
cpp = "text/x-c++src",
cpt = "application/mac-compactpro",
CQL = "text/cql",
cr2 = "image/x-canon-cr2",
crl = "application/pkix-crl",
crt = "application/x-x509-ca-cert",
crtr = "application/vnd.multiad.creator",
crw = "image/x-canon-crw",
cryptomator = "application/vnd.cryptomator.vault",
cryptonote = "application/vnd.rig.cryptonote",
csd = "audio/csound",
csf = "chemical/x-cache-csf",
csh = "application/x-csh",
csl = "application/vnd.citationstyles.style+xml",
csm = "chemical/x-csml",
csml = "chemical/x-csml",
csp = "application/vnd.commonspace",
csrattrs = "application/csrattrs",
css = "text/css",
cst = "application/vnd.commonspace",
csv = "text/csv",
csvs = "text/csv-schema",
ctab = "chemical/x-cactvs-binary",
ctx = "chemical/x-ctx",
cu = "application/cu-seeme",
cub = "chemical/x-gaussian-cube",
cuc = "application/tamp-community-update-confirm",
curl = "text/vnd.curl",
cw = "application/prs.cww",
cwl = "application/cwl",
cwl.json = "application/cwl+json",
cww = "application/prs.cww",
cxf = "chemical/x-cxf",
cxx = "text/x-c++src",
d = "text/x-dsrc",
dae = "model/vnd.collada+xml",
daf = "application/vnd.Mobius.DAF",
dart = "application/vnd.dart",
dataless = "application/vnd.fdsn.seed",
davmount = "application/davmount+xml",
dbf = "application/vnd.dbf",
dcd = "application/DCD",
dcm = "application/dicom",
dcr = "application/x-director",
dd2 = "application/vnd.oma.dd2+xml",
ddd = "application/vnd.fujixerox.ddd",
ddeb = "application/vnd.debian.binary-package",
ddf = "application/vnd.syncml.dmddf+xml",
deb = "application/vnd.debian.binary-package",
deploy = "application/octet-stream",
dfac = "application/vnd.dreamfactory",
dif = "video/dv",
diff = "text/x-diff",
dii = "application/DII",
dim = "application/vnd.fastcopy-disk-image",
dir = "application/x-director",
dis = "application/vnd.Mobius.DIS",
dist = "application/vnd.apple.installer+xml",
distz = "application/vnd.apple.installer+xml",
dit = "application/DIT",
dive = "application/vnd.patentdive",
djv = "image/vnd.djvu",
djvu = "image/vnd.djvu",
dl = "application/vnd.datalog",
dll = "application/x-msdos-program",
dls = "audio/dls",
dmg = "application/x-apple-diskimage",
dmp = "application/vnd.tcpdump.pcap",
dms = "text/vnd.DMClientScript",
dna = "application/vnd.dna",
doc = "application/msword",
docjson = "application/vnd.document+json",
docm = "application/vnd.ms-word.document.macroEnabled.12",
docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
dor = "model/vnd.gdl",
dot = "text/vnd.graphviz",
dotm = "application/vnd.ms-word.template.macroEnabled.12",
dotx = "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
dp = "application/vnd.osgi.dp",
dpg = "application/vnd.dpgraph",
dpgraph = "application/vnd.dpgraph",
dpkg = "application/vnd.xmpie.dpkg",
dpx = "image/dpx",
drle = "image/dicom-rle",
dsc = "text/prs.lines.tag",
dsm = "application/vnd.desmume.movie",
dssc = "application/dssc+der",
dtd = "application/xml-dtd",
dts = "audio/vnd.dts",
dtshd = "audio/vnd.dts.hd",
dv = "video/dv",
dvb = "video/vnd.dvb.file",
dvc = "application/dvcs",
dvi = "application/x-dvi",
dwd = "application/atsc-dwd+xml",
dwf = "model/vnd.dwf",
dwg = "image/vnd.dwg",
dx = "chemical/x-jcamp-dx",
dxf = "image/vnd.dxf",
dxp = "application/vnd.spotfire.dxp",
dxr = "application/x-director",
dzr = "application/vnd.dzr",
ebuild = "application/vnd.gentoo.ebuild",
ecelp4800 = "audio/vnd.nuera.ecelp4800",
ecelp7470 = "audio/vnd.nuera.ecelp7470",
ecelp9600 = "audio/vnd.nuera.ecelp9600",
ecig = "application/vnd.evolv.ecig.settings",
ecigprofile = "application/vnd.evolv.ecig.profile",
ecigtheme = "application/vnd.evolv.ecig.theme",
eclass = "application/vnd.gentoo.eclass",
edm = "application/vnd.novadigm.EDM",
edx = "application/vnd.novadigm.EDX",
efi = "application/efi",
efif = "application/vnd.picsel",
ei6 = "application/vnd.pg.osasli",
ELN = "application/vnd.eln+zip",
emb = "chemical/x-embl-dl-nucleotide",
embl = "chemical/x-embl-dl-nucleotide",
emf = "image/emf",
eml = "message/rfc822",
emm = "application/vnd.ibm.electronic-media",
emma = "application/emma+xml",
emotionml = "application/emotionml+xml",
ent = "application/xml-external-parsed-entity",
entity = "application/vnd.nervana",
enw = "audio/EVRCNW",
eol = "audio/vnd.digital-winds",
eot = "application/vnd.ms-fontobject",
ep = "application/vnd.bluetooth.ep.oob",
eps = "application/postscript",
eps2 = "application/postscript",
eps3 = "application/postscript",
epsf = "application/postscript",
epsi = "application/postscript",
epub = "application/epub+zip",
erf = "image/x-epson-erf",
es = "text/javascript",
es3 = "application/vnd.eszigno3+xml",
esa = "application/vnd.osgi.subsystem",
esf = "application/vnd.epson.esf",
espass = "application/vnd.espass-espass+zip",
et3 = "application/vnd.eszigno3+xml",
etx = "text/x-setext",
evb = "audio/EVRCB",
evc = "audio/EVRC",
evw = "audio/EVRCWB",
exe = "application/x-msdos-program",
exi = "application/exi",
exp = "application/express",
exr = "image/aces",
ext = "application/vnd.novadigm.EXT",
ez = "application/andrew-inset",
ez2 = "application/vnd.ezpix-album",
ez3 = "application/vnd.ezpix-package",
fb = "application/x-maker",
fbdoc = "application/x-maker",
fbs = "image/vnd.fastbidsheet",
fcdt = "application/vnd.adobe.formscentral.fcdt",
fch = "chemical/x-gaussian-checkpoint",
fchk = "chemical/x-gaussian-checkpoint",
fcs = "application/vnd.isac.fcs",
fdf = "application/fdf",
fdt = "application/fdt+xml",
fe_launch = "application/vnd.denovo.fcselayout-link",
fg5 = "application/vnd.fujitsu.oasysgp",
fig = "application/x-xfig",
finf = "application/fastinfoset",
fit = "image/fits",
fits = "image/fits",
fla = "application/vnd.dtg.local.flash",
flac = "audio/flac",
flb = "application/vnd.ficlab.flb+zip",
fli = "video/fli",
flo = "application/vnd.micrografx.flo",
flt = "text/vnd.ficlab.flt",
flv = "video/x-flv",
flw = "application/vnd.kde.kivio",
flx = "text/vnd.fmi.flexstor",
fly = "text/vnd.fly",
fm = "application/vnd.framemaker",
fo = "application/vnd.software602.filler.form+xml",
fpx = "image/vnd.fpx",
frame = "application/x-maker",
frm = "application/vnd.ufdl",
fsc = "application/vnd.fsc.weblaunch",
fst = "image/vnd.fst",
ftc = "application/vnd.fluxtime.clip",
fti = "application/vnd.anser-web-funds-transfer-initiation",
fts = "image/fits",
fvt = "video/vnd.fvt",
fxp = "application/vnd.adobe.fxp",
fxpl = "application/vnd.adobe.fxp",
fzs = "application/vnd.fuzzysheet",
g2w = "application/vnd.geoplan",
g3w = "application/vnd.geospace",
gac = "application/vnd.groove-account",
gal = "chemical/x-gaussian-log",
gam = "chemical/x-gamess-input",
gamin = "chemical/x-gamess-input",
gan = "application/x-ganttproject",
gau = "chemical/x-gaussian-input",
gbr = "application/rpki-ghostbusters",
gcd = "text/x-pcs-gcd",
gcf = "application/x-graphing-calculator",
gcg = "chemical/x-gcg8-sequence",
gdl = "model/vnd.gdl",
gdz = "application/vnd.familysearch.gedcom+zip",
ged = "text/vnd.familysearch.gedcom",
gen = "chemical/x-genbank",
genozip = "application/vnd.genozip",
geo = "application/vnd.dynageo",
geojson = "application/geo+json",
gex = "application/vnd.geometry-explorer",
gf = "application/x-tex-gf",
gff3 = "text/gff3",
ggb = "application/vnd.geogebra.file",
ggs = "application/vnd.geogebra.slides",
ggt = "application/vnd.geogebra.tool",
ghf = "application/vnd.groove-help",
gif = "image/gif",
gim = "application/vnd.groove-identity-message",
gjc = "chemical/x-gaussian-input",
gjf = "chemical/x-gaussian-input",
gl = "video/gl",
glb = "model/gltf-binary",
glbin = "application/gltf-buffer",
glbuf = "application/gltf-buffer",
gltf = "model/gltf+json",
gml = "application/gml+xml",
gnumeric = "application/x-gnumeric",
gph = "application/vnd.FloGraphIt",
gpkg = "application/geopackage+sqlite3",
gpkg.tar = "application/vnd.gentoo.gpkg",
gpt = "chemical/x-mopac-graph",
gqf = "application/vnd.grafeq",
gqs = "application/vnd.grafeq",
gram = "application/srgs",
grd = "application/vnd.gentics.grd+json",
gre = "application/vnd.geometry-explorer",
grv = "application/vnd.groove-injector",
grxml = "application/srgs+xml",
gsf = "application/x-font",
gsheet = "application/urc-grpsheet+xml",
gsm = "audio/x-gsm",
gtar = "application/x-gtar",
gtm = "application/vnd.groove-tool-message",
gtw = "model/vnd.gtw",
gv = "text/vnd.graphviz",
gxt = "application/vnd.geonext",
gz = "application/gzip",
h = "text/x-chdr",
`h++` = "text/x-c++hdr",
hal = "application/vnd.hal+xml",
hans = "text/vnd.hans",
hbc = "application/vnd.hbci",
hbci = "application/vnd.hbci",
hdf = "application/x-hdf",
hdr = "image/vnd.radiance",
hdt = "application/vnd.hdt",
heic = "image/heic",
heics = "image/heic-sequence",
heif = "image/heif",
heifs = "image/heif-sequence",
hej2 = "image/hej2k",
held = "application/atsc-held+xml",
hgl = "text/vnd.hgl",
hh = "text/x-c++hdr",
hif = "image/avif",
hin = "chemical/x-hin",
hpgl = "application/vnd.hp-HPGL",
hpi = "application/vnd.hp-hpid",
hpid = "application/vnd.hp-hpid",
hpp = "text/x-c++hdr",
hps = "application/vnd.hp-hps",
hpub = "application/prs.hpub+zip",
hqx = "application/mac-binhex40",
hs = "text/x-haskell",
hsj2 = "image/hsj2",
hsl = "application/vnd.hsl",
hta = "application/hta",
htc = "text/x-component",
htke = "application/vnd.kenameaapp",
htm = "text/html",
html = "text/html",
hvd = "application/vnd.yamaha.hv-dic",
hvp = "application/vnd.yamaha.hv-voice",
hvs = "application/vnd.yamaha.hv-script",
hwp = "application/x-hwp",
hxx = "text/x-c++hdr",
i2g = "application/vnd.intergeo",
ic0 = "application/vnd.commerce-battelle",
ic1 = "application/vnd.commerce-battelle",
ic2 = "application/vnd.commerce-battelle",
ic3 = "application/vnd.commerce-battelle",
ic4 = "application/vnd.commerce-battelle",
ic5 = "application/vnd.commerce-battelle",
ic6 = "application/vnd.commerce-battelle",
ic7 = "application/vnd.commerce-battelle",
ic8 = "application/vnd.commerce-battelle",
ica = "application/x-ica",
icc = "application/vnd.iccprofile",
icd = "application/vnd.commerce-battelle",
icf = "application/vnd.commerce-battelle",
icm = "application/vnd.iccprofile",
ico = "image/vnd.microsoft.icon",
ics = "text/calendar",
ief = "image/ief",
ifb = "text/calendar",
ifc = "application/p21",
ifm = "application/vnd.shana.informed.formdata",
iges = "model/iges",
igl = "application/vnd.igloader",
igm = "application/vnd.insors.igm",
ign = "application/vnd.coreos.ignition+json",
ignition = "application/vnd.coreos.ignition+json",
igs = "model/iges",
igx = "application/vnd.micrografx.igx",
iif = "application/vnd.shana.informed.interchange",
iii = "application/x-iphone",
imf = "application/vnd.imagemeter.folder+zip",
imgcal = "application/vnd.3lightssoftware.imagescal",
imi = "application/vnd.imagemeter.image+zip",
imp = "application/vnd.accpac.simply.imp",
ims = "application/vnd.ms-ims",
imscc = "application/vnd.ims.imsccv1p1",
info = "application/x-info",
ink = "application/inkml+xml",
inkml = "application/inkml+xml",
inp = "chemical/x-gamess-input",
ins = "application/x-internet-signup",
iota = "application/vnd.astraea-software.iota",
ipfix = "application/ipfix",
ipk = "application/vnd.shana.informed.package",
`ipns-record` = "application/vnd.ipfs.ipns-record",
irm = "application/vnd.ibm.rights-management",
irp = "application/vnd.irepository.package+xml",
ism = "model/vnd.gdl",
iso = "application/x-iso9660-image",
isp = "application/x-internet-signup",
ist = "chemical/x-isostar",
istc = "application/vnd.veryant.thin",
istr = "chemical/x-isostar",
isws = "application/vnd.veryant.thin",
itp = "application/vnd.shana.informed.formtemplate",
its = "application/its+xml",
ivp = "application/vnd.immervision-ivp",
ivu = "application/vnd.immervision-ivu",
j2c = "image/j2c",
J2C = "image/j2c",
j2k = "image/j2c",
J2K = "image/j2c",
jad = "text/vnd.sun.j2me.app-descriptor",
jam = "application/vnd.jam",
jar = "application/java-archive",
java = "text/x-java",
jdx = "chemical/x-jcamp-dx",
jpeg = "image/jpeg",
jhc = "image/jphc",
jisp = "application/vnd.jisp",
jls = "image/jls",
jlt = "application/vnd.hp-jlyt",
jmz = "application/x-jmol",
jng = "image/x-jng",
jnlp = "application/x-java-jnlp-file",
joda = "application/vnd.joost.joda-archive",
jp2 = "image/jp2",
jpg = "image/jpeg",
jpe = "image/jpeg",
jpf = "image/jpx",
jfif = "image/jpeg",
jpg2 = "image/jp2",
jpgm = "image/jpm",
jph = "image/jph",
jphc = "image/jphc",
jpm = "image/jpm",
jpx = "image/jpx",
jrd = "application/jrd+json",
js = "text/javascript",
json = "application/json",
`json-patch` = "application/json-patch+json",
jsonld = "application/ld+json",
jsontd = "application/td+json",
jsontm = "application/tm+json",
jt = "model/JT",
jtd = "text/vnd.esmertec.theme-descriptor",
jxl = "image/jxl",
jxr = "image/jxr",
jxra = "image/jxrA",
jxrs = "image/jxrS",
jxs = "image/jxs",
jxsc = "image/jxsc",
jxsi = "image/jxsi",
jxss = "image/jxss",
karbon = "application/vnd.kde.karbon",
kcm = "application/vnd.nervana",
key = "application/pgp-keys",
keynote = "application/vnd.apple.keynote",
kfo = "application/vnd.kde.kformula",
kia = "application/vnd.kidspiration",
kil = "application/x-killustrator",
kin = "chemical/x-kinemage",
kml = "application/vnd.google-earth.kml+xml",
kmz = "application/vnd.google-earth.kmz",
kne = "application/vnd.Kinar",
knp = "application/vnd.Kinar",
kom = "application/vnd.hbci",
kon = "application/vnd.kde.kontour",
koz = "audio/vnd.audiokoz",
kpr = "application/vnd.kde.kpresenter",
kpt = "application/vnd.kde.kpresenter",
ksp = "application/vnd.kde.kspread",
ktr = "application/vnd.kahootz",
ktx = "image/ktx",
ktx2 = "image/ktx2",
ktz = "application/vnd.kahootz",
kwd = "application/vnd.kde.kword",
kwt = "application/vnd.kde.kword",
l16 = "audio/L16",
las = "application/vnd.las",
lasjson = "application/vnd.las.las+json",
lasxml = "application/vnd.las.las+xml",
latex = "application/x-latex",
lbc = "audio/iLBC",
lbd = "application/vnd.llamagraphics.life-balance.desktop",
lbe = "application/vnd.llamagraphics.life-balance.exchange+xml",
lca = "application/vnd.logipipe.circuit+zip",
lcs = "application/vnd.logipipe.circuit+zip",
le = "application/vnd.bluetooth.le.oob",
les = "application/vnd.hhe.lesson-player",
lgr = "application/lgr+xml",
lha = "application/x-lha",
lhs = "text/x-literate-haskell",
lhzd = "application/vnd.belightsoft.lhzd+zip",
lhzl = "application/vnd.belightsoft.lhzl+zip",
lin = "application/bbolin",
line = "application/vnd.nebumind.line",
link66 = "application/vnd.route66.link66+xml",
list3820 = "application/vnd.afpc.modca",
listafp = "application/vnd.afpc.modca",
lmp = "model/vnd.gdl",
loas = "audio/usac",
loom = "application/vnd.loom",
lostsyncxml = "application/lostsync+xml",
lostxml = "application/lost+xml",
lpf = "application/lpf+zip",
lrm = "application/vnd.ms-lrm",
lsf = "video/x-la-asf",
lsx = "video/x-la-asf",
ltx = "text/x-tex",
lvp = "audio/vnd.lucent.voice",
lwp = "application/vnd.lotus-wordpro",
lxf = "application/LXF",
ly = "text/x-lilypond",
lyx = "application/x-lyx",
lzh = "application/x-lzh",
lzx = "application/x-lzx",
m = "application/vnd.wolfram.mathematica.package",
m1v = "video/mpeg",
m21 = "application/mp21",
m2v = "video/mpeg",
m3g = "application/m3g",
m3u = "audio/mpegurl",
m3u8 = "application/vnd.apple.mpegurl",
m4a = "audio/mp4",
m4s = "video/iso.segment",
m4u = "video/vnd.mpegurl",
m4v = "video/mp4",
ma = "application/mathematica",
mads = "application/mads+xml",
maei = "application/mmt-aei+xml",
mag = "application/vnd.ecowin.chart",
mail = "message/rfc822",
maker = "application/x-maker",
man = "application/x-troff-man",
manifest = "text/cache-manifest",
markdown = "text/markdown",
mb = "application/mathematica",
mbk = "application/vnd.Mobius.MBK",
mbox = "application/mbox",
mbsdf = "application/vnd.mdl-mbsdf",
mc1 = "application/vnd.medcalcdata",
mc2 = "text/vnd.senx.warpscript",
mcd = "application/vnd.mcd",
mcif = "chemical/x-mmcif",
mcm = "chemical/x-macmolecule",
md = "text/markdown",
mdb = "application/msaccess",
mdc = "application/vnd.marlin.drm.mdcf",
mdi = "image/vnd.ms-modi",
mdl = "application/vnd.mdl",
me = "application/x-troff-me",
mesh = "model/mesh",
meta4 = "application/metalink4+xml",
mets = "application/mets+xml",
mf4 = "application/MF4",
mfm = "application/vnd.mfmp",
mft = "application/rpki-manifest",
mgp = "application/vnd.osgeo.mapguide.package",
mgz = "application/vnd.proteus.magazine",
mhas = "audio/mhas",
mid = "audio/sp-midi",
mif = "application/vnd.mif",
miz = "text/mizar",
mj2 = "video/mj2",
mjp2 = "video/mj2",
mjs = "text/javascript",
mkv = "video/x-matroska",
ml2 = "application/vnd.sybyl.mol2",
mlp = "audio/vnd.dolby.mlp",
mm = "application/x-freemind",
mmd = "application/vnd.chipnuts.karaoke-mmd",
mmdb = "application/vnd.maxmind.maxmind-db",
mmf = "application/vnd.smaf",
mml = "application/mathml+xml",
mmod = "chemical/x-macromodel-input",
mmr = "image/vnd.fujixerox.edmics-mmr",
mng = "video/x-mng",
moc = "text/x-moc",
mod = "application/xml-dtd",
`model-inter` = "application/vnd.vd-study",
modl = "application/vnd.modl",
mods = "application/mods+xml",
mol = "chemical/x-mdl-molfile",
mol2 = "application/vnd.sybyl.mol2",
moml = "model/vnd.moml+xml",
moo = "chemical/x-mopac-out",
mop = "chemical/x-mopac-input",
mopcrt = "chemical/x-mopac-input",
mov = "video/quicktime",
movie = "video/x-sgi-movie",
mp1 = "audio/mpeg",
mp2 = "audio/mpeg",
mp21 = "application/mp21",
mp3 = "audio/mpeg",
mp4 = "video/mp4",
mpc = "application/vnd.mophun.certificate",
mpd = "application/dash+xml",
mpdd = "application/dashdelta",
mpe = "video/mpeg",
mpeg = "video/mpeg",
mpega = "audio/mpeg",
mpf = "text/vnd.ms-mediapackage",
mpg = "video/mpeg",
mpg4 = "video/mp4",
mpga = "audio/mpeg",
mph = "application/x-comsol",
mpkg = "application/vnd.apple.installer+xml",
mpm = "application/vnd.blueice.multipass",
mpn = "application/vnd.mophun.application",
mpp = "application/vnd.ms-project",
mpt = "application/vnd.ms-project",
mpv = "video/x-matroska",
mpw = "application/vnd.exstream-empower+zip",
mpy = "application/vnd.ibm.MiniPay",
mqy = "application/vnd.Mobius.MQY",
mrc = "application/marc",
mrcx = "application/marcxml+xml",
ms = "application/x-troff-ms",
msa = "application/vnd.msa-disk-image",
msd = "application/vnd.fdsn.mseed",
mseed = "application/vnd.fdsn.mseed",
mseq = "application/vnd.mseq",
msf = "application/vnd.epson.msf",
msh = "model/mesh",
msi = "application/x-msi",
msl = "application/vnd.Mobius.MSL",
msm = "model/vnd.gdl",
msp = "application/octet-stream",
msty = "application/vnd.muvee.style",
msu = "application/octet-stream",
mtl = "model/mtl",
mts = "model/vnd.mts",
multitrack = "audio/vnd.presonus.multitrack",
mus = "application/vnd.musician",
musd = "application/mmt-usd+xml",
mvb = "chemical/x-mopac-vib",
mvt = "application/vnd.mapbox-vector-tile",
mwc = "application/vnd.dpgraph",
mwf = "application/vnd.MFER",
mxf = "application/mxf",
mxi = "application/vnd.vd-study",
mxl = "application/vnd.recordare.musicxml",
mxmf = "audio/mobile-xmf",
mxml = "application/xv+xml",
mxs = "application/vnd.triscape.mxs",
mxu = "video/vnd.mpegurl",
n3 = "text/n3",
nb = "application/vnd.wolfram.mathematica",
nbp = "application/vnd.wolfram.player",
nc = "application/x-netcdf",
ndc = "application/vnd.osa.netdeploy",
ndl = "application/vnd.lotus-notes",
nds = "application/vnd.nintendo.nitro.rom",
nebul = "application/vnd.nebumind.line",
nef = "image/x-nikon-nef",
ngdat = "application/vnd.nokia.n-gage.data",
nim = "video/vnd.nokia.interleaved-multimedia",
nimn = "application/vnd.nimn",
nitf = "application/vnd.nitf",
nlu = "application/vnd.neurolanguage.nlu",
nml = "application/vnd.enliven",
nnd = "application/vnd.noblenet-directory",
nns = "application/vnd.noblenet-sealer",
nnw = "application/vnd.noblenet-web",
notebook = "application/vnd.smart.notebook",
nq = "application/n-quads",
ns2 = "application/vnd.lotus-notes",
ns3 = "application/vnd.lotus-notes",
ns4 = "application/vnd.lotus-notes",
nsf = "application/vnd.lotus-notes",
nsg = "application/vnd.lotus-notes",
nsh = "application/vnd.lotus-notes",
nt = "application/n-triples",
ntf = "application/vnd.lotus-notes",
numbers = "application/vnd.apple.numbers",
nwc = "application/x-nwc",
o = "application/x-object",
oa2 = "application/vnd.fujitsu.oasys2",
oa3 = "application/vnd.fujitsu.oasys3",
oas = "application/vnd.fujitsu.oasys",
ob = "application/vnd.1ob",
obg = "application/vnd.openblox.game-binary",
obgx = "application/vnd.openblox.game+xml",
obj = "model/obj",
oda = "application/ODA",
odb = "application/vnd.oasis.opendocument.base",
odc = "application/vnd.oasis.opendocument.chart",
odd = "application/tei+xml",
odf = "application/vnd.oasis.opendocument.formula",
odg = "application/vnd.oasis.opendocument.graphics",
odi = "application/vnd.oasis.opendocument.image",
odm = "application/vnd.oasis.opendocument.text-master",
odp = "application/vnd.oasis.opendocument.presentation",
ods = "application/vnd.oasis.opendocument.spreadsheet",
odt = "application/vnd.oasis.opendocument.text",
odx = "application/ODX",
oeb = "application/vnd.openeye.oeb",
oga = "audio/ogg",
ogex = "model/vnd.opengex",
ogg = "audio/ogg",
ogv = "video/ogg",
ogx = "application/ogg",
old = "application/x-trash",
omg = "audio/ATRAC3",
one = "application/onenote",
onepkg = "application/onenote",
onetmp = "application/onenote",
onetoc2 = "application/onenote",
opf = "application/oebps-package+xml",
oprc = "application/vnd.palm",
opus = "audio/ogg",
or2 = "application/vnd.lotus-organizer",
or3 = "application/vnd.lotus-organizer",
orc = "audio/csound",
orf = "image/x-olympus-orf",
org = "application/vnd.lotus-organizer",
orq = "application/ocsp-request",
ors = "application/ocsp-response",
osf = "application/vnd.yamaha.openscoreformat",
osm = "application/vnd.openstreetmap.data+xml",
ota = "application/vnd.android.ota",
otc = "application/vnd.oasis.opendocument.chart-template",
otf = "font/otf",
otg = "application/vnd.oasis.opendocument.graphics-template",
oth = "application/vnd.oasis.opendocument.text-web",
oti = "application/vnd.oasis.opendocument.image-template",
otm = "application/vnd.oasis.opendocument.text-master-template",
otp = "application/vnd.oasis.opendocument.presentation-template",
ots = "application/vnd.oasis.opendocument.spreadsheet-template",
ott = "application/vnd.oasis.opendocument.text-template",
ovl = "application/vnd.afpc.modca-overlay",
oxlicg = "application/vnd.oxli.countgraph",
oxps = "application/oxps",
oxt = "application/vnd.openofficeorg.extension",
oza = "application/x-oz-application",
p = "text/x-pascal",
p10 = "application/pkcs10",
p12 = "application/pkcs12",
p21 = "application/p21",
p2p = "application/vnd.wfa.p2p",
p7c = "application/pkcs7-mime",
p7m = "application/pkcs7-mime",
p7r = "application/x-pkcs7-certreqresp",
p7s = "application/pkcs7-signature",
p7z = "application/pkcs7-mime",
p8 = "application/pkcs8",
p8e = "application/pkcs8-encrypted",
pac = "application/x-ns-proxy-autoconfig",
package = "application/vnd.autopackage",
pages = "application/vnd.apple.pages",
pas = "text/x-pascal",
pat = "image/x-coreldrawpattern",
patch = "text/x-diff",
paw = "application/vnd.pawaafile",
pbd = "application/vnd.powerbuilder6",
pbm = "image/x-portable-bitmap",
pcap = "application/vnd.tcpdump.pcap",
pcf = "application/x-font-pcf",
pcf.Z = "application/x-font-pcf",
pcl = "application/vnd.hp-PCL",
pcx = "image/vnd.zbrush.pcx",
pdb = "application/vnd.palm",
pdf = "application/pdf",
pdx = "application/PDX",
pem = "application/pem-certificate-chain",
pfa = "application/x-font",
pfb = "application/x-font",
pfr = "application/font-tdpfr",
pfx = "application/pkcs12",
pgb = "image/vnd.globalgraphics.pgb",
PGB = "image/vnd.globalgraphics.pgb",
pgm = "image/x-portable-graymap",
pgn = "application/vnd.chess-pgn",
pgp = "application/pgp-encrypted",
pil = "application/vnd.piaccess.application-licence",
pk = "application/x-tex-pk",
pkd = "application/vnd.hbci",
pkg = "application/vnd.apple.installer+xml",
pki = "application/pkixcmp",
pkipath = "application/pkix-pkipath",
pl = "text/x-perl",
plb = "application/vnd.3gpp.pic-bw-large",
plc = "application/vnd.Mobius.PLC",
plf = "application/vnd.pocketlearn",
plj = "audio/vnd.everad.plj",
plp = "application/vnd.panoply",
pls = "audio/x-scpls",
pm = "text/x-perl",
pml = "application/vnd.ctc-posml",
png = "image/png",
pnm = "image/x-portable-anymap",
portpkg = "application/vnd.macports.portpkg",
pot = "text/plain",
potm = "application/vnd.ms-powerpoint.template.macroEnabled.12",
potx = "application/vnd.openxmlformats-officedocument.presentationml.template",
ppam = "application/vnd.ms-powerpoint.addin.macroEnabled.12",
ppd = "application/vnd.cups-ppd",
ppkg = "application/vnd.xmpie.ppkg",
ppm = "image/x-portable-pixmap",
pps = "application/vnd.ms-powerpoint",
ppsm = "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
ppsx = "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
ppt = "application/vnd.ms-powerpoint",
pptm = "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
ppttc = "application/vnd.think-cell.ppttc+json",
pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
pqa = "application/vnd.palm",
prc = "model/prc",
pre = "application/vnd.lotus-freelance",
preminet = "application/vnd.preminet",
prf = "application/pics-rules",
provn = "text/provenance-notation",
provx = "application/provenance+xml",
prt = "chemical/x-ncbi-asn1-ascii",
prz = "application/vnd.lotus-freelance",
ps = "application/postscript",
psb = "application/vnd.3gpp.pic-bw-small",
psd = "image/vnd.adobe.photoshop",
pseg3820 = "application/vnd.afpc.modca",
psfs = "application/vnd.psfs",
psg = "application/vnd.afpc.modca-pagesegment",
psid = "audio/prs.sid",
pskcxml = "application/pskc+xml",
pt = "application/vnd.snesdev-page-table",
pti = "image/prs.pti",
ptid = "application/vnd.pvi.ptid1",
ptrom = "application/vnd.snesdev-page-table",
pub = "application/vnd.exstream-package",
pvb = "application/vnd.3gpp.pic-bw-var",
pwn = "application/vnd.3M.Post-it-Notes",
py = "text/x-python",
pya = "audio/vnd.ms-playready.media.pya",
pyc = "application/x-python-code",
pyo = "application/x-python-code",
pyox = "model/vnd.pytha.pyox",
pyv = "video/vnd.ms-playready.media.pyv",
qam = "application/vnd.epson.quickanime",
qbo = "application/vnd.intu.qbo",
qca = "application/vnd.ericsson.quickcall",
qcall = "application/vnd.ericsson.quickcall",
qcp = "audio/EVRC-QCP",
QCP = "audio/EVRC-QCP",
qfx = "application/vnd.intu.qfx",
qgs = "application/x-qgis",
qps = "application/vnd.publishare-delta-tree",
qt = "video/quicktime",
qtl = "application/x-quicktimeplayer",
quiz = "application/vnd.quobject-quoxdocument",
quox = "application/vnd.quobject-quoxdocument",
qvd = "application/vnd.theqvd",
qwd = "application/vnd.Quark.QuarkXPress",
qwt = "application/vnd.Quark.QuarkXPress",
qxb = "application/vnd.Quark.QuarkXPress",
qxd = "application/vnd.Quark.QuarkXPress",
qxl = "application/vnd.Quark.QuarkXPress",
qxt = "application/vnd.Quark.QuarkXPress",
ra = "audio/x-pn-realaudio",
ram = "audio/x-pn-realaudio",
rapd = "application/route-apd+xml",
rar = "application/vnd.rar",
ras = "image/x-cmu-raster",
rb = "application/x-ruby",
rcprofile = "application/vnd.ipunplugged.rcprofile",
rct = "application/prs.nprend",
rd = "chemical/x-mdl-rdfile",
rdf = "application/rdf+xml",
`rdf-crypt` = "application/prs.rdf-xml-crypt",
rdp = "application/x-rdp",
rdz = "application/vnd.data-vision.rdz",
relo = "application/p2p-overlay+xml",
reload = "application/vnd.resilient.logic",
rep = "application/vnd.businessobjects",
request = "application/vnd.nervana",
rfcxml = "application/rfc+xml",
rgb = "image/x-rgb",
rgbe = "image/vnd.radiance",
rif = "application/reginfo+xml",
rip = "audio/vnd.rip",
rl = "application/resource-lists+xml",
rlc = "image/vnd.fujixerox.edmics-rlc",
rld = "application/resource-lists-diff+xml",
rlm = "application/vnd.resilient.logic",
rm = "audio/x-pn-realaudio",
rms = "application/vnd.jcp.javame.midlet-rms",
rnc = "application/relax-ng-compact-syntax",
rnd = "application/prs.nprend",
roa = "application/rpki-roa",
roff = "text/troff",
ros = "chemical/x-rosdal",
rp9 = "application/vnd.cloanto.rp9",
rpm = "application/x-redhat-package-manager",
rpss = "application/vnd.nokia.radio-presets",
rpst = "application/vnd.nokia.radio-preset",
rq = "application/sparql-query",
rs = "application/rls-services+xml",
rsat = "application/atsc-rsat+xml",
rsheet = "application/urc-ressheet+xml",
rsm = "model/vnd.gdl",
rss = "application/x-rss+xml",
rst = "text/prs.fallenstein.rst",
rtf = "application/rtf",
rusd = "application/route-usd+xml",
rxn = "chemical/x-mdl-rxnfile",
rxt = "application/vnd.medicalholodeck.recordxr",
s11 = "video/vnd.sealed.mpeg1",
s14 = "video/vnd.sealed.mpeg4",
s1a = "application/vnd.sealedmedia.softseal.pdf",
s1e = "application/vnd.sealed.xls",
s1g = "image/vnd.sealedmedia.softseal.gif",
s1h = "application/vnd.sealedmedia.softseal.html",
s1j = "image/vnd.sealedmedia.softseal.jpg",
s1m = "audio/vnd.sealedmedia.softseal.mpeg",
s1n = "image/vnd.sealed.png",
s1p = "application/vnd.sealed.ppt",
s1q = "video/vnd.sealedmedia.softseal.mov",
s1w = "application/vnd.sealed.doc",
s3df = "application/vnd.sealed.3df",
sac = "application/tamp-sequence-adjust-confirm",
saf = "application/vnd.yamaha.smaf-audio",
sam = "application/vnd.lotus-wordpro",
SAR = "application/vnd.sar",
sarif = "application/sarif+json",
`sarif-external-properties` = "application/sarif-external-properties+json",
`sarif-external-properties.json` = "application/sarif-external-properties+json",
sarif.json = "application/sarif+json",
sc = "application/vnd.ibm.secure-container",
scala = "text/x-scala",
scd = "application/vnd.scribus",
sce = "application/vnd.etsi.asic-e+zip",
sci = "application/x-scilab",
scim = "application/scim+json",
scl = "application/vnd.sycle+xml",
scld = "application/vnd.doremir.scorecloud-binary-document",
scm = "application/vnd.lotus-screencam",
sco = "audio/csound",
scq = "application/scvp-cv-request",
scr = "application/x-silverlight",
scs = "application/scvp-cv-response",
scsf = "application/vnd.sealed.csf",
sd = "chemical/x-mdl-sdfile",
sd2 = "audio/x-sd2",
sda = "application/vnd.stardivision.draw",
sdc = "application/vnd.stardivision.calc",
sdd = "application/vnd.stardivision.impress",
sdf = "application/vnd.Kinar",
sdkd = "application/vnd.solent.sdkm+xml",
sdkm = "application/vnd.solent.sdkm+xml",
sdo = "application/vnd.sealed.doc",
sdoc = "application/vnd.sealed.doc",
sdp = "application/sdp",
sds = "application/vnd.stardivision.chart",
sdw = "application/vnd.stardivision.writer",
see = "application/vnd.seemail",
seed = "application/vnd.fdsn.seed",
sem = "application/vnd.sealed.eml",
sema = "application/vnd.sema",
semd = "application/vnd.semd",
semf = "application/vnd.semf",
seml = "application/vnd.sealed.eml",
senml = "application/senml+json",
`senml-etchc` = "application/senml-etch+cbor",
`senml-etchj` = "application/senml-etch+json",
senmlc = "application/senml+cbor",
senmle = "application/senml-exi",
senmlx = "application/senml+xml",
sensml = "application/sensml+json",
sensmlc = "application/sensml+cbor",
sensmle = "application/sensml-exi",
sensmlx = "application/sensml+xml",
ser = "application/java-serialized-object",
sfc = "application/vnd.nintendo.snes.rom",
sfd = "application/vnd.font-fontforge-sfd",
`sfd-hdstx` = "application/vnd.hydrostatix.sof-data",
sfs = "application/vnd.spotfire.sfs",
sfv = "text/x-sfv",
sgf = "application/x-go-sgf",
sgi = "image/vnd.sealedmedia.softseal.gif",
sgif = "image/vnd.sealedmedia.softseal.gif",
sgl = "application/vnd.stardivision.writer-global",
sgm = "text/SGML",
sgml = "text/SGML",
sh = "application/x-sh",
shaclc = "text/shaclc",
shar = "application/x-shar",
shc = "text/shaclc",
shex = "text/shex",
shf = "application/shf+xml",
shp = "application/vnd.shp",
shtml = "text/html",
shx = "application/vnd.shx",
si = "text/vnd.wap.si",
sic = "application/vnd.wap.sic",
sid = "audio/prs.sid",
sieve = "application/sieve",
sig = "application/pgp-signature",
sik = "application/x-trash",
silo = "model/mesh",
sipa = "application/vnd.smintio.portals.archive",
sis = "application/vnd.symbian.install",
sit = "application/x-stuffit",
sitx = "application/x-stuffit",
siv = "application/sieve",
sjp = "image/vnd.sealedmedia.softseal.jpg",
sjpg = "image/vnd.sealedmedia.softseal.jpg",
skd = "application/vnd.koan",
skm = "application/vnd.koan",
skp = "application/vnd.koan",
skt = "application/vnd.koan",
sl = "text/vnd.wap.sl",
sla = "application/vnd.scribus",
slaz = "application/vnd.scribus",
slc = "application/vnd.wap.slc",
sldm = "application/vnd.ms-powerpoint.slide.macroEnabled.12",
sldx = "application/vnd.openxmlformats-officedocument.presentationml.slide",
sls = "application/route-s-tsid+xml",
slt = "application/vnd.epson.salt",
sm = "application/vnd.stepmania.stepchart",
smc = "application/vnd.nintendo.snes.rom",
smf = "application/vnd.stardivision.math",
smh = "application/vnd.sealed.mht",
smht = "application/vnd.sealed.mht",
smi = "application/smil+xml",
smil = "application/smil+xml",
smk = "video/vnd.radgamettools.smacker",
sml = "application/smil+xml",
smo = "video/vnd.sealedmedia.softseal.mov",
smov = "video/vnd.sealedmedia.softseal.mov",
smp = "audio/vnd.sealedmedia.softseal.mpeg",
smp3 = "audio/vnd.sealedmedia.softseal.mpeg",
smpg = "video/vnd.sealed.mpeg1",
sms = "application/vnd.3gpp2.sms",
smv = "audio/SMV",
smzip = "application/vnd.stepmania.package",
snd = "audio/basic",
soa = "text/dns",
soc = "application/sgml-open-catalog",
sofa = "audio/sofa",
sos = "text/vnd.sosi",
spc = "chemical/x-galactic-spc",
spd = "application/vnd.sealedmedia.softseal.pdf",
spdf = "application/vnd.sealedmedia.softseal.pdf",
spdx = "text/spdx",
spdx.json = "application/spdx+json",
spf = "application/vnd.yamaha.smaf-phrase",
spl = "application/futuresplash",
spn = "image/vnd.sealed.png",
spng = "image/vnd.sealed.png",
spo = "text/vnd.in3d.spot",
spot = "text/vnd.in3d.spot",
spp = "application/scvp-vp-response",
sppt = "application/vnd.sealed.ppt",
spq = "application/scvp-vp-request",
spx = "audio/ogg",
sql = "application/sql",
sqlite = "application/vnd.sqlite3",
sqlite3 = "application/vnd.sqlite3",
sr = "application/vnd.sigrok.session",
src = "application/x-wais-source",
srt = "text/plain",
sru = "application/sru+xml",
srx = "application/sparql-results+xml",
sse = "application/vnd.kodak-descriptor",
ssf = "application/vnd.epson.ssf",
ssml = "application/ssml+xml",
ssv = "application/vnd.shade-save-file",
ssvc = "application/vnd.crypto-shade-file",
ssw = "video/vnd.sealed.swf",
sswf = "video/vnd.sealed.swf",
st = "application/vnd.sailingtracker.track",
stc = "application/vnd.sun.xml.calc.template",
std = "application/vnd.sun.xml.draw.template",
step = "model/step",
stf = "application/vnd.wt.stf",
sti = "application/vnd.sun.xml.impress.template",
stif = "application/vnd.sealed.tiff",
stix = "application/stix+json",
stk = "application/hyperstudio",
stl = "model/stl",
stml = "application/vnd.sealedmedia.softseal.html",
stp = "model/step",
stpnc = "application/p21",
stpx = "model/step+xml",
stpxz = "model/step-xml+zip",
stpz = "model/step+zip",
str = "application/vnd.pg.format",
`study-inter` = "application/vnd.vd-study",
stw = "application/vnd.sun.xml.writer.template",
sty = "text/x-tex",
sus = "application/vnd.sus-calendar",
susp = "application/vnd.sus-calendar",
sv4cpio = "application/x-sv4cpio",
sv4crc = "application/x-sv4crc",
svc = "application/vnd.dvb.service",
svg = "image/svg+xml",
svgz = "image/svg+xml",
sw = "chemical/x-swissprot",
swf = "application/vnd.adobe.flash.movie",
swi = "application/vnd.aristanetworks.swi",
swidtag = "application/swid+xml",
sxc = "application/vnd.sun.xml.calc",
sxd = "application/vnd.sun.xml.draw",
sxg = "application/vnd.sun.xml.writer.global",
sxi = "application/vnd.sun.xml.impress",
sxl = "application/vnd.sealed.xls",
sxls = "application/vnd.sealed.xls",
sxm = "application/vnd.sun.xml.math",
sxw = "application/vnd.sun.xml.writer",
sy2 = "application/vnd.sybyl.mol2",
syft.json = "application/vnd.syft+json",
t = "text/troff",
tag = "text/prs.lines.tag",
taglet = "application/vnd.mynfc",
tam = "application/vnd.onepager",
tamp = "application/vnd.onepagertamp",
tamx = "application/vnd.onepagertamx",
tao = "application/vnd.tao.intent-module-archive",
tap = "image/vnd.tencent.tap",
tar = "application/x-tar",
tat = "application/vnd.onepagertat",
tatp = "application/vnd.onepagertatp",
tatx = "application/vnd.onepagertatx",
tau = "application/tamp-apex-update",
taz = "application/x-gtar-compressed",
tcap = "application/vnd.3gpp2.tcap",
tcl = "application/x-tcl",
tcu = "application/tamp-community-update",
td = "application/urc-targetdesc+xml",
teacher = "application/vnd.smart.teacher",
tei = "application/tei+xml",
teiCorpus = "application/tei+xml",
ter = "application/tamp-error",
tex = "text/x-tex",
texi = "application/x-texinfo",
texinfo = "application/x-texinfo",
text = "text/plain",
tfi = "application/thraud+xml",
tfx = "image/tiff-fx",
tgf = "chemical/x-mdl-tgf",
tgz = "application/x-gtar-compressed",
thmx = "application/vnd.ms-officetheme",
tif = "image/tiff",
tiff = "image/tiff",
tk = "text/x-tcl",
tlclient = "application/vnd.cendio.thinlinc.clientconf",
tm = "text/texmacs",
tm.json = "application/tm+json",
tm.jsonld = "application/tm+json",
tmo = "application/vnd.tmobile-livetv",
tnef = "application/vnd.ms-tnef",
tnf = "application/vnd.ms-tnef",
torrent = "application/x-bittorrent",
tpl = "application/vnd.groove-tool-template",
tpt = "application/vnd.trid.tpt",
tr = "text/troff",
tra = "application/vnd.trueapp",
tree = "application/vnd.rainstor.data",
trig = "application/trig",
ts = "text/vnd.trolltech.linguist",
tsa = "application/tamp-sequence-adjust",
tsd = "application/timestamped-data",
tsp = "application/dsptype",
tsq = "application/timestamp-query",
tsr = "application/timestamp-reply",
tst = "application/vnd.etsi.timestamp-token",
tsv = "text/tab-separated-values",
ttc = "font/collection",
ttf = "font/ttf",
ttl = "text/turtle",
ttml = "application/ttml+xml",
tuc = "application/tamp-update-confirm",
tur = "application/tamp-update",
twd = "application/vnd.SimTech-MindMapper",
twds = "application/vnd.SimTech-MindMapper",
txd = "application/vnd.genomatix.tuxedo",
txf = "application/vnd.Mobius.TXF",
txt = "text/plain",
u3d = "model/u3d",
u8dsn = "message/global-delivery-status",
u8hdr = "message/global-headers",
u8mdn = "message/global-disposition-notification",
u8msg = "message/global",
udeb = "application/vnd.debian.binary-package",
ufd = "application/vnd.ufdl",
ufdl = "application/vnd.ufdl",
uis = "application/urc-uisocketdesc+xml",
umj = "application/vnd.umajin",
unityweb = "application/vnd.unity",
uo = "application/vnd.uoml+xml",
uoml = "application/vnd.uoml+xml",
upa = "application/vnd.hbci",
uri = "text/uri-list",
urim = "application/vnd.uri-map",
urimap = "application/vnd.uri-map",
uris = "text/uri-list",
usda = "model/vnd.usda",
usdz = "model/vnd.usdz+zip",
ustar = "application/x-ustar",
utz = "application/vnd.uiq.theme",
uva = "audio/vnd.dece.audio",
uvd = "application/vnd.dece.data",
uvf = "application/vnd.dece.data",
uvg = "image/vnd.dece.graphic",
uvh = "video/vnd.dece.hd",
uvi = "image/vnd.dece.graphic",
uvm = "video/vnd.dece.mobile",
uvp = "video/vnd.dece.pd",
uvs = "video/vnd.dece.sd",
uvt = "application/vnd.dece.ttml+xml",
uvu = "video/vnd.dece.mp4",
uvv = "video/vnd.dece.video",
uvva = "audio/vnd.dece.audio",
uvvd = "application/vnd.dece.data",
uvvf = "application/vnd.dece.data",
uvvg = "image/vnd.dece.graphic",
uvvh = "video/vnd.dece.hd",
uvvi = "image/vnd.dece.graphic",
uvvm = "video/vnd.dece.mobile",
uvvp = "video/vnd.dece.pd",
uvvs = "video/vnd.dece.sd",
uvvt = "application/vnd.dece.ttml+xml",
uvvu = "video/vnd.dece.mp4",
uvvv = "video/vnd.dece.video",
uvvx = "application/vnd.dece.unspecified",
uvvz = "application/vnd.dece.zip",
uvx = "application/vnd.dece.unspecified",
uvz = "application/vnd.dece.zip",
val = "chemical/x-ncbi-asn1-binary",
vbk = "audio/vnd.nortel.vbk",
vbox = "application/vnd.previewsystems.box",
vcard = "text/vcard",
vcd = "application/x-cdlink",
vcf = "text/vcard",
vcg = "application/vnd.groove-vcard",
vcj = "application/voucher-cms+json",
vcs = "text/x-vcalendar",
vcx = "application/vnd.vcx",
vds = "model/vnd.sap.vds",
VES = "application/vnd.ves.encrypted",
vew = "application/vnd.lotus-approach",
VFK = "text/vnd.exchangeable",
vfr = "application/vnd.tml",
viaframe = "application/vnd.tml",
vis = "application/vnd.visionary",
viv = "video/vnd.vivo",
vmd = "chemical/x-vmd",
vms = "chemical/x-vamas-iso14976",
vmt = "application/vnd.valve.source.material",
vpm = "multipart/voice-message",
vrm = "model/vrml",
vrml = "model/vrml",
vsc = "application/vnd.vidsoft.vidconference",
vsd = "application/vnd.visio",
vsf = "application/vnd.vsf",
vss = "application/vnd.visio",
vst = "application/vnd.visio",
vsw = "application/vnd.visio",
vtf = "image/vnd.valve.source.texture",
vtnstd = "application/vnd.veritone.aion+json",
vtt = "text/vtt",
vtu = "model/vnd.vtu",
vwx = "application/vnd.vectorworks",
vxml = "application/voicexml+xml",
wad = "application/x-doom",
wadl = "application/vnd.sun.wadl+xml",
wafl = "application/vnd.wasmflow.wafl",
wasm = "application/wasm",
wav = "audio/x-wav",
wax = "audio/x-ms-wax",
wbmp = "image/vnd.wap.wbmp",
wbs = "application/vnd.criticaltools.wbs+xml",
wbxml = "application/vnd.wap.wbxml",
wcm = "application/vnd.ms-works",
wdb = "application/vnd.ms-works",
webm = "video/webm",
webmanifest = "application/manifest+json",
webp = "image/webp",
wg = "application/vnd.pmi.widget",
wgsl = "text/wgsl",
wgt = "application/widget",
wif = "application/watcherinfo+xml",
win = "model/vnd.gdl",
wk = "application/x-123",
wk1 = "application/vnd.lotus-1-2-3",
wk3 = "application/vnd.lotus-1-2-3",
wk4 = "application/vnd.lotus-1-2-3",
wks = "application/vnd.ms-works",
wlnk = "application/link-format",
wm = "video/x-ms-wm",
wma = "audio/x-ms-wma",
wmc = "application/vnd.wmc",
wmd = "application/x-ms-wmd",
wmf = "image/wmf",
wml = "text/vnd.wap.wml",
wmlc = "application/vnd.wap.wmlc",
wmls = "text/vnd.wap.wmlscript",
wmlsc = "application/vnd.wap.wmlscriptc",
wmv = "video/x-ms-wmv",
wmx = "video/x-ms-wmx",
wmz = "application/x-ms-wmz",
woff = "font/woff",
woff2 = "font/woff2",
wpd = "application/vnd.wordperfect",
wpl = "application/vnd.ms-wpl",
wps = "application/vnd.ms-works",
wqd = "application/vnd.wqd",
wrl = "model/vrml",
wsc = "application/vnd.wfa.wsc",
wsdl = "application/wsdl+xml",
wspolicy = "application/wspolicy+xml",
wtb = "application/vnd.webturbo",
wv = "application/vnd.wv.csp+wbxml",
wvx = "video/x-ms-wvx",
wz = "application/x-wingz",
x_b = "model/vnd.parasolid.transmit.binary",
x_t = "model/vnd.parasolid.transmit.text",
x3d = "model/x3d+xml",
x3db = "model/x3d+fastinfoset",
x3dv = "model/x3d-vrml",
x3dvz = "model/x3d-vrml",
x3dz = "model/x3d+xml",
xar = "application/vnd.xara",
xav = "application/xcap-att+xml",
xbd = "application/vnd.fujixerox.docuworks.binder",
xbm = "image/x-xbitmap",
xca = "application/xcap-caps+xml",
xcf = "image/x-xcf",
xcos = "application/x-scilab-xcos",
xcs = "application/calendar+xml",
xct = "application/vnd.fujixerox.docuworks.container",
xdd = "application/bacnet-xdd+zip",
xdf = "application/xcap-diff+xml",
xdm = "application/vnd.syncml.dm+xml",
xdp = "application/vnd.adobe.xdp+xml",
xdssc = "application/dssc+xml",
xdw = "application/vnd.fujixerox.docuworks",
xel = "application/xcap-el+xml",
xer = "application/xcap-error+xml",
xfd = "application/vnd.xfdl",
xfdf = "application/xfdf",
xfdl = "application/vnd.xfdl",
xhe = "audio/usac",
xht = "application/xhtml+xml",
xhtm = "application/xhtml+xml",
xhtml = "application/xhtml+xml",
xhvml = "application/xv+xml",
xif = "image/vnd.xiff",
xla = "application/vnd.ms-excel",
xlam = "application/vnd.ms-excel.addin.macroEnabled.12",
xlc = "application/vnd.ms-excel",
xlf = "application/xliff+xml",
xlim = "application/vnd.xmpie.xlim",
xlm = "application/vnd.ms-excel",
xls = "application/vnd.ms-excel",
xlsb = "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
xlsm = "application/vnd.ms-excel.sheet.macroEnabled.12",
xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
xlt = "application/vnd.ms-excel",
xltm = "application/vnd.ms-excel.template.macroEnabled.12",
xltx = "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
xlw = "application/vnd.ms-excel",
xml = "application/xml",
xmls = "application/dskpp+xml",
xmt_bin = "model/vnd.parasolid.transmit.binary",
xmt_txt = "model/vnd.parasolid.transmit.text",
xns = "application/xcap-ns+xml",
xo = "application/vnd.olpc-sugar",
xodp = "application/vnd.collabio.xodocuments.presentation",
xods = "application/vnd.collabio.xodocuments.spreadsheet",
xodt = "application/vnd.collabio.xodocuments.document",
xop = "application/xop+xml",
xotp = "application/vnd.collabio.xodocuments.presentation-template",
xots = "application/vnd.collabio.xodocuments.spreadsheet-template",
xott = "application/vnd.collabio.xodocuments.document-template",
xpak = "application/vnd.gentoo.xpak",
xpi = "application/x-xpinstall",
xpm = "image/x-xpixmap",
xpr = "application/vnd.is-xpr",
xps = "application/vnd.ms-xpsdocument",
xpw = "application/vnd.intercon.formnet",
xpx = "application/vnd.intercon.formnet",
xsf = "application/prs.xsf+xml",
xsl = "application/xslt+xml",
xslt = "application/xslt+xml",
xsm = "application/vnd.syncml+xml",
xspf = "application/xspf+xml",
xtel = "chemical/x-xtel",
xul = "application/vnd.mozilla.xul+xml",
xvm = "application/xv+xml",
xvml = "application/xv+xml",
xwd = "image/x-xwindowdump",
xyz = "chemical/x-xyz",
xyze = "image/vnd.radiance",
xz = "application/x-xz",
yaml = "application/yaml",
yang = "application/yang",
yin = "application/yin+xml",
yme = "application/vnd.yaoweme",
yml = "application/yaml",
yt = "video/vnd.youtube.yt",
zaz = "application/vnd.zzazz.deck+xml",
zfc = "application/vnd.filmit.zfc",
zfo = "application/vnd.software602.filler.form-xml-zip",
zip = "application/zip",
zir = "application/vnd.zul",
zirz = "application/vnd.zul",
zmm = "application/vnd.HandHeld-Entertainment+xml",
zmt = "chemical/x-mopac-input",
zone = "text/dns",
zst = "application/zstd"
)
mime/src/ 0000755 0001762 0000144 00000000000 14766076760 012013 5 ustar ligges users mime/src/rawmatch.c 0000644 0001762 0000144 00000001117 14766076662 013766 0 ustar ligges users #include
#include
SEXP rawmatch(SEXP needle, SEXP haystack) {
int i, j, n1, n2;
Rbyte *x1, *x2;
SEXP ans;
n1 = LENGTH(needle);
x1 = RAW(needle);
n2 = LENGTH(haystack);
x2 = RAW(haystack);
if (n1 * n2 == 0 || n1 > n2) return allocVector(INTSXP, 0);
ans = allocVector(INTSXP, 1);
for (i = 0; i <= (n2 - n1); i++) {
if (x2[i] == x1[0]) {
for (j = 0; j < n1; j++) {
if (x2[i + j] != x1[j]) break;
}
if (j == n1) {
INTEGER(ans)[0] = i + 1;
return ans;
}
}
}
return allocVector(INTSXP, 0);
}
mime/src/init.c 0000644 0001762 0000144 00000000571 14766076662 013126 0 ustar ligges users #include
#include
#include
#include
extern SEXP rawmatch (SEXP needle, SEXP haystack);
static const R_CallMethodDef callMethods[] = {
{"rawmatch", (DL_FUNC) &rawmatch, 2},
{NULL, NULL, 0}
};
void R_init_mime(DllInfo *dll)
{
R_registerRoutines(dll, NULL, callMethods, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
mime/NAMESPACE 0000644 0001762 0000144 00000000235 14766076662 012444 0 ustar ligges users # Generated by roxygen2: do not edit by hand
export(guess_type)
export(mimemap)
export(parse_multipart)
import(utils)
useDynLib(mime, .registration = TRUE)
mime/inst/ 0000755 0001762 0000144 00000000000 14766076662 012202 5 ustar ligges users mime/inst/NEWS.Rd 0000644 0001762 0000144 00000000426 14766076662 013247 0 ustar ligges users \name{NEWS}
\title{News for Package 'mime'}
\section{CHANGES IN mime VERSION 999.999}{
\itemize{
\item This NEWS file is only a placeholder. The version 999.999 does not really
exist. Please read the NEWS on Github: \url{https://github.com/yihui/mime/releases}
}
}
mime/README.md 0000644 0001762 0000144 00000001720 14766076662 012504 0 ustar ligges users ## mime
[](https://github.com/yihui/mime/actions)
[](https://cran.r-project.org/package=mime)
This is an R package for mapping filename extensions to [MIME
types](https://en.wikipedia.org/wiki/Internet_media_type), based on the data
[derived](https://github.com/yihui/mime/blob/main/tools/update.R) from
`/etc/mime.types`.
``` r
# installation
install.packages('mime')
library(mime)
guess_type(c('a/b/c.html', 'd.pdf', 'e.odt', 'foo.docx', 'tex'))
# [1] "text/html"
# [2] "application/pdf"
# [3] "application/vnd.oasis.opendocument.text"
# [4] "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
# [5] "text/x-tex"
```
mime/man/ 0000755 0001762 0000144 00000000000 14766076662 012000 5 ustar ligges users mime/man/mimemap.Rd 0000644 0001762 0000144 00000001365 14766076662 013721 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mime.R
\docType{data}
\name{mimemap}
\alias{mimemap}
\title{Tables for mapping filename extensions to MIME types}
\source{
The file \verb{/etc/mime.types} on Debian.
}
\description{
The data \code{mimemap} is a named character vector that stores the filename
extensions and the corresponding MIME types, e.g. \code{c(html = 'text/html', pdf = 'application/pdf', ...)}. The character vector \code{mime:::mimeextra} stores
some additional types that we know, such as Markdown files (\code{.md}), or R
scripts (\code{.R}).
}
\examples{
str(as.list(mimemap))
mimemap["pdf"]
mimemap[c("html", "js", "css")]
# additional MIME types (not exported)
mime:::mimeextra
}
\keyword{datasets}
mime/man/parse_multipart.Rd 0000644 0001762 0000144 00000001332 14766076662 015501 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse.R
\name{parse_multipart}
\alias{parse_multipart}
\title{Parse multipart form data}
\usage{
parse_multipart(env)
}
\arguments{
\item{env}{the HTTP request environment}
}
\value{
A named list containing the values of the form data, and the files
uploaded are saved to temporary files (the temporary filenames are
returned). It may also be \code{NULL} if there is anything unexpected in the
form data, or the form is empty.
}
\description{
This function parses the HTML form data from a Rook environment (an HTTP POST
request).
}
\references{
This function was borrowed from
\url{https://github.com/jeffreyhorner/Rook/} with slight modifications.
}
mime/man/guess_type.Rd 0000644 0001762 0000144 00000003411 14766076662 014455 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mime.R
\name{guess_type}
\alias{guess_type}
\title{Guess the MIME types from filenames}
\usage{
guess_type(
file,
unknown = "application/octet-stream",
empty = "text/plain",
mime_extra = mimeextra,
subtype = ""
)
}
\arguments{
\item{file}{a character vector of filenames, or filename extensions}
\item{unknown}{the MIME type to return when the file extension was not found
in the table}
\item{empty}{the MIME type for files that do not have extensions}
\item{mime_extra}{a named character vector of the form \code{c(extension = type)}
providing extra MIME types (by default, \code{mime:::mimeextra}); note this MIME
table takes precedence over the standard table \code{\link{mimemap}}}
\item{subtype}{a character vector of MIME subtypes, which should be of the
same length as \code{file} if provided (use an empty character string for a file
if we do not want a subtype for it)}
}
\description{
Look up in the \code{\link{mimemap}} table for the MIME types based on the extensions of
the given filenames.
}
\examples{
library(mime)
# well-known file types
guess_type(c("a/b/c.html", "d.pdf", "e.odt", "foo.docx", "tex"))
# not in the standard table, but in mimeextra
guess_type(c("a.md", "b.R"), mime_extra = NULL)
guess_type(c("a.md", "b.R"))
# override the standard MIME table (tex is text/x-tex by default)
guess_type("tex", mime_extra = c(tex = "text/plain"))
# unknown extension 'zzz'
guess_type("foo.zzz")
# force unknown types to be plain text
guess_type("foo.zzz", unknown = "text/plain")
# empty file extension
guess_type("Makefile")
# we know it is a plain text file
guess_type("Makefile", empty = "text/plain")
# subtypes
guess_type(c("abc.html", "def.htm"), subtype = c("charset=UTF-8", ""))
}
mime/DESCRIPTION 0000644 0001762 0000144 00000001623 14766101762 012723 0 ustar ligges users Package: mime
Type: Package
Title: Map Filenames to MIME Types
Version: 0.13
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666", URL = "https://yihui.org")),
person("Jeffrey", "Horner", role = "ctb"),
person("Beilei", "Bian", role = "ctb")
)
Description: Guesses the MIME type from a filename extension using the data
derived from /etc/mime.types in UNIX-type systems.
Imports: tools
License: GPL
URL: https://github.com/yihui/mime
BugReports: https://github.com/yihui/mime/issues
RoxygenNote: 7.3.2
Encoding: UTF-8
NeedsCompilation: yes
Packaged: 2025-03-17 19:54:24 UTC; runner
Author: Yihui Xie [aut, cre] (,
https://yihui.org),
Jeffrey Horner [ctb],
Beilei Bian [ctb]
Maintainer: Yihui Xie
Repository: CRAN
Date/Publication: 2025-03-17 20:20:02 UTC