├── .github └── workflows │ └── rust.yml ├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md ├── benches └── benchmark.rs ├── build.rs ├── examples └── rev_map.rs └── src ├── impl_bin_search.rs ├── impl_phf.rs ├── lib.rs └── mime_types.rs /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Build 13 | run: cargo build --verbose 14 | - name: Run tests 15 | run: cargo test --verbose 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | target 3 | Cargo.lock 4 | src/mime_types_generated.rs 5 | .idea/ 6 | *.iml -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "mime_guess" 4 | version = "2.0.5" 5 | authors = ["Austin Bonander "] 6 | license = "MIT" 7 | description = "A simple crate for detection of a file's MIME type by its extension." 8 | keywords = ["mime", "filesystem", "extension"] 9 | repository = "https://github.com/abonander/mime_guess" 10 | documentation = "https://docs.rs/mime_guess/" 11 | readme = "README.md" 12 | 13 | [features] 14 | default = ["rev-mappings"] 15 | # FIXME: when `phf` release 0.8.0 is ready 16 | # phf-map = ["phf", "phf_codegen"] 17 | 18 | # generate reverse-mappings for lookup of extensions by MIME type 19 | # default-on but can be turned off for smaller generated code 20 | rev-mappings = [] 21 | 22 | [dependencies] 23 | mime = "0.3.4" 24 | unicase = "2.4.0" 25 | 26 | #[dependencies.phf] 27 | ## version = "0.7.24" 28 | ## git = "https://github.com/sfackler/rust-phf" 29 | #path = "../rust-phf/phf" 30 | #features = ["unicase"] 31 | #optional = true 32 | 33 | [build-dependencies] 34 | unicase = "2.4.0" 35 | 36 | #[build-dependencies.phf_codegen] 37 | #version = "0.7.24" 38 | #git = "https://github.com/sfackler/rust-phf" 39 | #path = "../rust-phf/phf_codegen" 40 | #optional = true 41 | 42 | [dev-dependencies] 43 | criterion = "0.3" 44 | 45 | [[example]] 46 | name = "rev_map" 47 | required-features = ["rev-mappings"] 48 | 49 | [[bench]] 50 | name = "benchmark" 51 | harness = false 52 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Austin Bonander 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mime_guess ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/abonander/mime_guess/rust.yml?branch=master) [![Crates.io](https://img.shields.io/crates/v/mime_guess.svg)](https://crates.io/crates/mime_guess) 2 | 3 | MIME/MediaType guessing by file extension. 4 | Uses a static map of known file extension -> MIME type mappings. 5 | 6 | **Returning Contributors: New Requirements for Submissions Below** 7 | 8 | ##### Required Rust Version: 1.33 9 | 10 | #### [Documentation](https://docs.rs/mime_guess/) 11 | 12 | ### Versioning 13 | 14 | Due to a mistaken premature release, `mime_guess` currently publicly depends on a pre-1.0 `mime`, 15 | which means `mime` upgrades are breaking changes and necessitate a major version bump. 16 | Refer to the following table to find a version of `mime_guess` which matches your version of `mime`: 17 | 18 | | `mime` version | `mime_guess` version | 19 | |----------------|----------------------| 20 | | `0.1.x, 0.2.x` | `1.x.y` | 21 | | `0.3.x` | `2.x.y` | 22 | 23 | #### Note: MIME Types Returned Are Not Stable/Guaranteed 24 | The media types returned for a given extension are not considered to be part of the crate's 25 | stable API and are often updated in patch (`x.y.z + 1`) releases to be as correct as possible. MIME 26 | changes are backported to previous major releases on a best-effort basis. 27 | 28 | Note that only the extensions of paths/filenames are inspected in order to guess the MIME type. The 29 | file that may or may not reside at that path may or may not be a valid file of the returned MIME type. 30 | Be wary of unsafe or un-validated assumptions about file structure or length. 31 | 32 | An extension may also have multiple applicable MIME types. When more than one is returned, the first 33 | is considered to be the most "correct"--see below for elaboration. 34 | 35 | Contributing 36 | ----------- 37 | 38 | #### Adding or correcting MIME types for extensions 39 | 40 | Is the MIME type for a file extension wrong or missing? Great! 41 | Well, not great for us, but great for you if you'd like to open a pull request! 42 | 43 | The file extension -> MIME type mappings are listed in `src/mime_types.rs`. 44 | **The list is sorted lexicographically by file extension, and all extensions are lowercase (where applicable).** 45 | The former is necessary to support fallback to binary search when the 46 | `phf-map` feature is turned off, and for the maintainers' sanity. 47 | The latter is only for consistency's sake; the search is case-insensitive. 48 | 49 | Simply add or update the appropriate string pair(s) to make the correction(s) needed. 50 | Run `cargo test` to make sure the library continues to work correctly. 51 | 52 | #### Important! Citing the corrected MIME type 53 | 54 | When opening a pull request, please include a link to an official document or RFC noting 55 | the correct MIME type for the file type in question **in the commit message** so 56 | that the commit history can be used as an audit trail. 57 | 58 | Though we're only guessing here, we like to be as correct as we can. 59 | It makes it much easier to vet your contribution if we don't have to search for corroborating material. 60 | 61 | #### Multiple MIME types per extension 62 | As of `2.0.0`, multiple MIME types per extension are supported. The first MIME type in the list for 63 | a given extension should be the most "correct" so users who only care about getting a single MIME 64 | type can use the `first*()` methods. 65 | 66 | The definition of "correct" is open to debate, however. In the author's opinion this should be 67 | whatever is defined by the latest IETF RFC for the given file format, or otherwise explicitly 68 | supercedes all others. 69 | 70 | If an official IANA registration replaces an older "experimental" style media type, please 71 | place the new type before the old type in the list, but keep the old type for reference: 72 | 73 | ``` 74 | - ("md", &["text/x-markdown"]), 75 | + ("md", &["text/markdown", "text/x-markdown"]), 76 | ``` 77 | 78 | #### Changes to the API or operation of the crate 79 | 80 | We're open to changes to the crate's API or its inner workings, breaking or not, if it improves the overall operation, efficiency, or ergonomics of the crate. However, it would be a good idea to open an issue on the repository so we can discuss your proposed changes and decide how best to approach them. 81 | 82 | 83 | License 84 | ------- 85 | 86 | MIT (See the `LICENSE` file in this repository for more information.) 87 | -------------------------------------------------------------------------------- /benches/benchmark.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate criterion; 3 | extern crate mime_guess; 4 | 5 | use self::criterion::Criterion; 6 | 7 | use mime_guess::from_ext; 8 | 9 | include!("../src/mime_types.rs"); 10 | 11 | /// WARNING: this may take a while! 12 | fn bench_mime_str(c: &mut Criterion) { 13 | c.bench_function("from_ext", |b| { 14 | for (mime_ext, _) in MIME_TYPES { 15 | b.iter(|| from_ext(mime_ext).first_raw()); 16 | } 17 | }); 18 | } 19 | 20 | fn bench_mime_str_uppercase(c: &mut Criterion) { 21 | c.bench_function("from_ext uppercased", |b| { 22 | let uppercased = MIME_TYPES.into_iter().map(|(s, _)| s.to_uppercase()); 23 | 24 | for mime_ext in uppercased { 25 | b.iter(|| from_ext(&mime_ext).first_raw()); 26 | } 27 | }); 28 | } 29 | 30 | criterion_group!(benches, bench_mime_str, bench_mime_str_uppercase); 31 | criterion_main!(benches); 32 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "phf")] 2 | extern crate phf_codegen; 3 | extern crate unicase; 4 | 5 | use unicase::UniCase; 6 | 7 | use std::env; 8 | use std::fs::File; 9 | use std::io::prelude::*; 10 | use std::io::BufWriter; 11 | use std::path::Path; 12 | 13 | use std::collections::BTreeMap; 14 | 15 | use mime_types::MIME_TYPES; 16 | 17 | #[path = "src/mime_types.rs"] 18 | mod mime_types; 19 | 20 | #[cfg(feature = "phf")] 21 | const PHF_PATH: &str = "::impl_::phf"; 22 | 23 | fn main() { 24 | let out_dir = env::var("OUT_DIR").unwrap(); 25 | let dest_path = Path::new(&out_dir).join("mime_types_generated.rs"); 26 | let mut outfile = BufWriter::new(File::create(&dest_path).unwrap()); 27 | 28 | println!( 29 | "cargo:rustc-env=MIME_TYPES_GENERATED_PATH={}", 30 | dest_path.display() 31 | ); 32 | 33 | #[cfg(feature = "phf")] 34 | build_forward_map(&mut outfile); 35 | 36 | #[cfg(feature = "rev-mappings")] 37 | build_rev_map(&mut outfile); 38 | } 39 | 40 | // Build forward mappings (ext -> mime type) 41 | #[cfg(feature = "phf")] 42 | fn build_forward_map(out: &mut W) { 43 | use phf_codegen::Map as PhfMap; 44 | 45 | let mut forward_map = PhfMap::new(); 46 | forward_map.phf_path(PHF_PATH); 47 | 48 | let mut map_entries: Vec<(&str, Vec<&str>)> = Vec::new(); 49 | 50 | for &(key, types) in MIME_TYPES { 51 | if let Some(&mut (key_, ref mut values)) = map_entries.last_mut() { 52 | // deduplicate extensions 53 | if key == key_ { 54 | values.extend_from_slice(types); 55 | continue; 56 | } 57 | } 58 | 59 | map_entries.push((key, types.into())); 60 | } 61 | 62 | for (key, values) in map_entries { 63 | forward_map.entry( 64 | UniCase::new(key), 65 | &format!("&{:?}", values), 66 | ); 67 | } 68 | 69 | writeln!( 70 | out, 71 | "static MIME_TYPES: phf::Map, &'static [&'static str]> = \n{};", 72 | forward_map.build() 73 | ) 74 | .unwrap(); 75 | } 76 | 77 | // Build reverse mappings (mime type -> ext) 78 | #[cfg(all(feature = "phf", feature = "rev-mappings"))] 79 | fn build_rev_map(out: &mut W) { 80 | use phf_codegen::Map as PhfMap; 81 | 82 | let dyn_map = get_rev_mappings(); 83 | 84 | let mut rev_map = PhfMap::new(); 85 | rev_map.phf_path(PHF_PATH); 86 | 87 | let mut exts = Vec::new(); 88 | 89 | for (top, subs) in dyn_map { 90 | let top_start = exts.len(); 91 | 92 | let mut sub_map = PhfMap::new(); 93 | sub_map.phf_path(PHF_PATH); 94 | 95 | for (sub, sub_exts) in subs { 96 | let sub_start = exts.len(); 97 | exts.extend(sub_exts); 98 | let sub_end = exts.len(); 99 | 100 | sub_map.entry(sub, &format!("({}, {})", sub_start, sub_end)); 101 | } 102 | 103 | let top_end = exts.len(); 104 | 105 | rev_map.entry( 106 | top, 107 | &format!( 108 | "TopLevelExts {{ start: {}, end: {}, subs: {} }}", 109 | top_start, top_end, sub_map.build() 110 | ), 111 | ); 112 | } 113 | 114 | writeln!( 115 | out, 116 | "static REV_MAPPINGS: phf::Map, TopLevelExts> = \n{};", 117 | rev_map.build() 118 | ).unwrap(); 119 | 120 | writeln!(out, "const EXTS: &'static [&'static str] = &{:?};", exts).unwrap(); 121 | } 122 | 123 | #[cfg(all(not(feature = "phf"), feature = "rev-mappings"))] 124 | fn build_rev_map(out: &mut W) { 125 | use std::fmt::Write as _; 126 | 127 | macro_rules! unicase_const { 128 | ($s:expr) => ({ 129 | format_args!("{}({:?})", (if $s.is_ascii() { 130 | "UniCase::ascii" 131 | } else { 132 | "UniCase::unicode" 133 | }), $s) 134 | }) 135 | } 136 | 137 | let dyn_map = get_rev_mappings(); 138 | 139 | write!(out, "static REV_MAPPINGS: &'static [(UniCase<&'static str>, TopLevelExts)] = &[").unwrap(); 140 | 141 | let mut exts = Vec::new(); 142 | 143 | for (top, subs) in dyn_map { 144 | let top_start = exts.len(); 145 | 146 | let mut sub_map = String::new(); 147 | 148 | for (sub, sub_exts) in subs { 149 | let sub_start = exts.len(); 150 | exts.extend(sub_exts); 151 | let sub_end = exts.len(); 152 | 153 | write!( 154 | sub_map, 155 | "({}, ({}, {})),", 156 | unicase_const!(sub), sub_start, sub_end 157 | ).unwrap(); 158 | } 159 | 160 | let top_end = exts.len(); 161 | 162 | write!( 163 | out, 164 | "({}, TopLevelExts {{ start: {}, end: {}, subs: &[{}] }}),", 165 | unicase_const!(top), top_start, top_end, sub_map 166 | ).unwrap(); 167 | } 168 | 169 | writeln!(out, "];").unwrap(); 170 | 171 | writeln!(out, "const EXTS: &'static [&'static str] = &{:?};", exts).unwrap(); 172 | } 173 | 174 | #[cfg(feature = "rev-mappings")] 175 | fn get_rev_mappings( 176 | ) -> BTreeMap, BTreeMap, Vec<&'static str>>> { 177 | // First, collect all the mime type -> ext mappings) 178 | let mut dyn_map = BTreeMap::new(); 179 | for &(key, types) in MIME_TYPES { 180 | for val in types { 181 | let (top, sub) = split_mime(val); 182 | dyn_map 183 | .entry(UniCase::new(top)) 184 | .or_insert_with(BTreeMap::new) 185 | .entry(UniCase::new(sub)) 186 | .or_insert_with(Vec::new) 187 | .push(key); 188 | } 189 | } 190 | dyn_map 191 | } 192 | 193 | fn split_mime(mime: &str) -> (&str, &str) { 194 | let split_idx = mime.find('/').unwrap(); 195 | (&mime[..split_idx], &mime[split_idx + 1..]) 196 | } 197 | -------------------------------------------------------------------------------- /examples/rev_map.rs: -------------------------------------------------------------------------------- 1 | extern crate mime_guess; 2 | 3 | fn main() { 4 | print_exts("video/*"); 5 | print_exts("video/x-matroska"); 6 | } 7 | 8 | fn print_exts(mime_type: &str) { 9 | println!( 10 | "Exts for {:?}: {:?}", 11 | mime_type, 12 | mime_guess::get_mime_extensions_str(mime_type) 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /src/impl_bin_search.rs: -------------------------------------------------------------------------------- 1 | use unicase::UniCase; 2 | 3 | include!("mime_types.rs"); 4 | include!(env!("MIME_TYPES_GENERATED_PATH")); 5 | 6 | #[cfg(feature = "rev-mappings")] 7 | #[derive(Copy, Clone)] 8 | struct TopLevelExts { 9 | start: usize, 10 | end: usize, 11 | subs: &'static [(UniCase<&'static str>, (usize, usize))], 12 | } 13 | 14 | pub fn get_mime_types(ext: &str) -> Option<&'static [&'static str]> { 15 | let ext = UniCase::new(ext); 16 | 17 | map_lookup(MIME_TYPES, &ext) 18 | } 19 | 20 | #[cfg(feature = "rev-mappings")] 21 | pub fn get_extensions(toplevel: &str, sublevel: &str) -> Option<&'static [&'static str]> { 22 | if toplevel == "*" { 23 | return Some(EXTS); 24 | } 25 | 26 | let top = map_lookup(REV_MAPPINGS, toplevel)?; 27 | 28 | if sublevel == "*" { 29 | return Some(&EXTS[top.start..top.end]); 30 | } 31 | 32 | let sub = map_lookup(&top.subs, sublevel)?; 33 | Some(&EXTS[sub.0..sub.1]) 34 | } 35 | 36 | fn map_lookup(map: &'static [(K, V)], key: &str) -> Option 37 | where K: Copy + Into>, V: Copy { 38 | map.binary_search_by_key(&UniCase::new(key), |(k, _)| (*k).into()) 39 | .ok() 40 | .map(|i| map[i].1) 41 | } 42 | -------------------------------------------------------------------------------- /src/impl_phf.rs: -------------------------------------------------------------------------------- 1 | extern crate phf; 2 | 3 | use unicase::UniCase; 4 | 5 | include!(env!("MIME_TYPES_GENERATED_PATH")); 6 | 7 | #[cfg(feature = "rev-mappings")] 8 | struct TopLevelExts { 9 | start: usize, 10 | end: usize, 11 | subs: phf::Map, (usize, usize)>, 12 | } 13 | 14 | pub fn get_mime_types(ext: &str) -> Option<&'static [&'static str]> { 15 | map_lookup(&MIME_TYPES, ext).cloned() 16 | } 17 | 18 | pub fn get_extensions(toplevel: &str, sublevel: &str) -> Option<&'static [&'static str]> { 19 | if toplevel == "*" { 20 | return Some(EXTS); 21 | } 22 | 23 | let top = map_lookup(&REV_MAPPINGS, toplevel)?; 24 | 25 | if sublevel == "*" { 26 | return Some(&EXTS[top.start..top.end]); 27 | } 28 | 29 | let sub = map_lookup(&top.subs, sublevel)?; 30 | Some(&EXTS[sub.0..sub.1]) 31 | } 32 | 33 | fn map_lookup<'key, 'map: 'key, V>( 34 | map: &'map phf::Map, V>, 35 | key: &'key str, 36 | ) -> Option<&'map V> { 37 | // FIXME: this doesn't compile unless we transmute `key` to `UniCase<&'static str>` 38 | // https://github.com/sfackler/rust-phf/issues/169 39 | map.get(&UniCase::new(key)) 40 | } 41 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Guessing of MIME types by file extension. 2 | //! 3 | //! Uses a static list of file-extension : MIME type mappings. 4 | //! 5 | //! ``` 6 | //! # extern crate mime; 7 | //! // the file doesn't have to exist, it just looks at the path 8 | //! let guess = mime_guess::from_path("some_file.gif"); 9 | //! assert_eq!(guess.first(), Some(mime::IMAGE_GIF)); 10 | //! 11 | //! ``` 12 | //! 13 | //! #### Note: MIME Types Returned Are Not Stable/Guaranteed 14 | //! The media types returned for a given extension are not considered to be part of the crate's 15 | //! stable API and are often updated in patch
(`x.y.[z + 1]`) releases to be as correct as 16 | //! possible. 17 | //! 18 | //! Additionally, only the extensions of paths/filenames are inspected in order to guess the MIME 19 | //! type. The file that may or may not reside at that path may or may not be a valid file of the 20 | //! returned MIME type. Be wary of unsafe or un-validated assumptions about file structure or 21 | //! length. 22 | pub extern crate mime; 23 | extern crate unicase; 24 | 25 | pub use mime::Mime; 26 | 27 | use std::ffi::OsStr; 28 | use std::iter::FusedIterator; 29 | use std::path::Path; 30 | use std::{iter, slice}; 31 | 32 | #[cfg(feature = "phf")] 33 | #[path = "impl_phf.rs"] 34 | mod impl_; 35 | 36 | #[cfg(not(feature = "phf"))] 37 | #[path = "impl_bin_search.rs"] 38 | mod impl_; 39 | 40 | /// A "guess" of the MIME/Media Type(s) of an extension or path as one or more 41 | /// [`Mime`](struct.Mime.html) instances. 42 | /// 43 | /// ### Note: Ordering 44 | /// A given file format may have one or more applicable Media Types; in this case 45 | /// the first Media Type returned is whatever is declared in the latest IETF RFC for the 46 | /// presumed file format or the one that explicitly supercedes all others. 47 | /// Ordering of additional Media Types is arbitrary. 48 | /// 49 | /// ### Note: Values Not Stable 50 | /// The exact Media Types returned in any given guess are not considered to be stable and are often 51 | /// updated in patch releases in order to reflect the most up-to-date information possible. 52 | #[derive(Copy, Clone, Debug, PartialEq, Eq)] 53 | // FIXME: change repr when `mime` gains macro/const fn constructor 54 | pub struct MimeGuess(&'static [&'static str]); 55 | 56 | impl MimeGuess { 57 | /// Guess the MIME type of a file (real or otherwise) with the given extension. 58 | /// 59 | /// The search is case-insensitive. 60 | /// 61 | /// If `ext` is empty or has no (currently) known MIME type mapping, then an empty guess is 62 | /// returned. 63 | pub fn from_ext(ext: &str) -> MimeGuess { 64 | if ext.is_empty() { 65 | return MimeGuess(&[]); 66 | } 67 | 68 | impl_::get_mime_types(ext).map_or(MimeGuess(&[]), |v| MimeGuess(v)) 69 | } 70 | 71 | /// Guess the MIME type of `path` by its extension (as defined by 72 | /// [`Path::extension()`]). **No disk access is performed.** 73 | /// 74 | /// If `path` has no extension, the extension cannot be converted to `str`, or has 75 | /// no known MIME type mapping, then an empty guess is returned. 76 | /// 77 | /// The search is case-insensitive. 78 | /// 79 | /// ## Note 80 | /// **Guess** is the operative word here, as there are no guarantees that the contents of the 81 | /// file that `path` points to match the MIME type associated with the path's extension. 82 | /// 83 | /// Take care when processing files with assumptions based on the return value of this function. 84 | /// 85 | /// [`Path::extension()`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.extension 86 | pub fn from_path>(path: P) -> MimeGuess { 87 | path.as_ref() 88 | .extension() 89 | .and_then(OsStr::to_str) 90 | .map_or(MimeGuess(&[]), Self::from_ext) 91 | } 92 | 93 | /// `true` if the guess did not return any known mappings for the given path or extension. 94 | pub fn is_empty(&self) -> bool { 95 | self.0.is_empty() 96 | } 97 | 98 | /// Get the number of MIME types in the current guess. 99 | pub fn count(&self) -> usize { 100 | self.0.len() 101 | } 102 | 103 | /// Get the first guessed `Mime`, if applicable. 104 | /// 105 | /// See [Note: Ordering](#note-ordering) above. 106 | pub fn first(&self) -> Option { 107 | self.first_raw().map(expect_mime) 108 | } 109 | 110 | /// Get the first guessed Media Type as a string, if applicable. 111 | /// 112 | /// See [Note: Ordering](#note-ordering) above. 113 | pub fn first_raw(&self) -> Option<&'static str> { 114 | self.0.get(0).cloned() 115 | } 116 | 117 | /// Get the first guessed `Mime`, or if the guess is empty, return 118 | /// [`application/octet-stream`] instead. 119 | /// 120 | /// See [Note: Ordering](#note-ordering) above. 121 | /// 122 | /// ### Note: HTTP Applications 123 | /// For HTTP request and response bodies if a value for the `Content-Type` header 124 | /// cannot be determined it might be preferable to not send one at all instead of defaulting to 125 | /// `application/octet-stream` as the recipient will expect to infer the format directly from 126 | /// the content instead. ([RFC 7231, Section 3.1.1.5][rfc7231]) 127 | /// 128 | /// On the contrary, for `multipart/form-data` bodies, the `Content-Type` of a form-data part is 129 | /// assumed to be `text/plain` unless specified so a default of `application/octet-stream` 130 | /// for non-text parts is safer. ([RFC 7578, Section 4.4][rfc7578]) 131 | /// 132 | /// [`application/octet-stream`]: https://docs.rs/mime/0.3/mime/constant.APPLICATION_OCTET_STREAM.html 133 | /// [rfc7231]: https://tools.ietf.org/html/rfc7231#section-3.1.1.5 134 | /// [rfc7578]: https://tools.ietf.org/html/rfc7578#section-4.4 135 | pub fn first_or_octet_stream(&self) -> Mime { 136 | self.first_or(mime::APPLICATION_OCTET_STREAM) 137 | } 138 | 139 | /// Get the first guessed `Mime`, or if the guess is empty, return 140 | /// [`text/plain`](::mime::TEXT_PLAIN) instead. 141 | /// 142 | /// See [Note: Ordering](#note-ordering) above. 143 | pub fn first_or_text_plain(&self) -> Mime { 144 | self.first_or(mime::TEXT_PLAIN) 145 | } 146 | 147 | /// Get the first guessed `Mime`, or if the guess is empty, return the given `Mime` instead. 148 | /// 149 | /// See [Note: Ordering](#note-ordering) above. 150 | pub fn first_or(&self, default: Mime) -> Mime { 151 | self.first().unwrap_or(default) 152 | } 153 | 154 | /// Get the first guessed `Mime`, or if the guess is empty, execute the closure and return its 155 | /// result. 156 | /// 157 | /// See [Note: Ordering](#note-ordering) above. 158 | pub fn first_or_else(&self, default_fn: F) -> Mime 159 | where 160 | F: FnOnce() -> Mime, 161 | { 162 | self.first().unwrap_or_else(default_fn) 163 | } 164 | 165 | /// Get an iterator over the `Mime` values contained in this guess. 166 | /// 167 | /// See [Note: Ordering](#note-ordering) above. 168 | pub fn iter(&self) -> Iter { 169 | Iter(self.iter_raw().map(expect_mime)) 170 | } 171 | 172 | /// Get an iterator over the raw media-type strings in this guess. 173 | /// 174 | /// See [Note: Ordering](#note-ordering) above. 175 | pub fn iter_raw(&self) -> IterRaw { 176 | IterRaw(self.0.iter().cloned()) 177 | } 178 | } 179 | 180 | impl IntoIterator for MimeGuess { 181 | type Item = Mime; 182 | type IntoIter = Iter; 183 | 184 | fn into_iter(self) -> Self::IntoIter { 185 | self.iter() 186 | } 187 | } 188 | 189 | impl<'a> IntoIterator for &'a MimeGuess { 190 | type Item = Mime; 191 | type IntoIter = Iter; 192 | 193 | fn into_iter(self) -> Self::IntoIter { 194 | self.iter() 195 | } 196 | } 197 | 198 | /// An iterator over the `Mime` types of a `MimeGuess`. 199 | /// 200 | /// See [Note: Ordering on `MimeGuess`](struct.MimeGuess.html#note-ordering). 201 | #[derive(Clone, Debug)] 202 | pub struct Iter(iter::Map Mime>); 203 | 204 | impl Iterator for Iter { 205 | type Item = Mime; 206 | 207 | fn next(&mut self) -> Option { 208 | self.0.next() 209 | } 210 | 211 | fn size_hint(&self) -> (usize, Option) { 212 | self.0.size_hint() 213 | } 214 | } 215 | 216 | impl DoubleEndedIterator for Iter { 217 | fn next_back(&mut self) -> Option { 218 | self.0.next_back() 219 | } 220 | } 221 | 222 | impl FusedIterator for Iter {} 223 | 224 | impl ExactSizeIterator for Iter { 225 | fn len(&self) -> usize { 226 | self.0.len() 227 | } 228 | } 229 | 230 | /// An iterator over the raw media type strings of a `MimeGuess`. 231 | /// 232 | /// See [Note: Ordering on `MimeGuess`](struct.MimeGuess.html#note-ordering). 233 | #[derive(Clone, Debug)] 234 | pub struct IterRaw(iter::Cloned>); 235 | 236 | impl Iterator for IterRaw { 237 | type Item = &'static str; 238 | 239 | fn next(&mut self) -> Option { 240 | self.0.next() 241 | } 242 | 243 | fn size_hint(&self) -> (usize, Option) { 244 | self.0.size_hint() 245 | } 246 | } 247 | 248 | impl DoubleEndedIterator for IterRaw { 249 | fn next_back(&mut self) -> Option { 250 | self.0.next_back() 251 | } 252 | } 253 | 254 | impl FusedIterator for IterRaw {} 255 | 256 | impl ExactSizeIterator for IterRaw { 257 | fn len(&self) -> usize { 258 | self.0.len() 259 | } 260 | } 261 | 262 | fn expect_mime(s: &str) -> Mime { 263 | // `.parse()` should be checked at compile time to never fail 264 | s.parse() 265 | .unwrap_or_else(|e| panic!("failed to parse media-type {:?}: {}", s, e)) 266 | } 267 | 268 | /// Wrapper of [`MimeGuess::from_ext()`](struct.MimeGuess.html#method.from_ext). 269 | pub fn from_ext(ext: &str) -> MimeGuess { 270 | MimeGuess::from_ext(ext) 271 | } 272 | 273 | /// Wrapper of [`MimeGuess::from_path()`](struct.MimeGuess.html#method.from_path). 274 | pub fn from_path>(path: P) -> MimeGuess { 275 | MimeGuess::from_path(path) 276 | } 277 | 278 | /// Guess the MIME type of `path` by its extension (as defined by `Path::extension()`). 279 | /// 280 | /// If `path` has no extension, or its extension has no known MIME type mapping, 281 | /// then the MIME type is assumed to be `application/octet-stream`. 282 | /// 283 | /// ## Note 284 | /// **Guess** is the operative word here, as there are no guarantees that the contents of the file 285 | /// that `path` points to match the MIME type associated with the path's extension. 286 | /// 287 | /// Take care when processing files with assumptions based on the return value of this function. 288 | /// 289 | /// In HTTP applications, it might be [preferable][rfc7231] to not send a `Content-Type` 290 | /// header at all instead of defaulting to `application/octet-stream`. 291 | /// 292 | /// [rfc7231]: https://tools.ietf.org/html/rfc7231#section-3.1.1.5 293 | #[deprecated( 294 | since = "2.0.0", 295 | note = "Use `from_path(path).first_or_octet_stream()` instead" 296 | )] 297 | pub fn guess_mime_type>(path: P) -> Mime { 298 | from_path(path).first_or_octet_stream() 299 | } 300 | 301 | /// Guess the MIME type of `path` by its extension (as defined by `Path::extension()`). 302 | /// 303 | /// If `path` has no extension, or its extension has no known MIME type mapping, 304 | /// then `None` is returned. 305 | /// 306 | #[deprecated(since = "2.0.0", note = "Use `from_path(path).first()` instead")] 307 | pub fn guess_mime_type_opt>(path: P) -> Option { 308 | from_path(path).first() 309 | } 310 | 311 | /// Guess the MIME type string of `path` by its extension (as defined by `Path::extension()`). 312 | /// 313 | /// If `path` has no extension, or its extension has no known MIME type mapping, 314 | /// then `None` is returned. 315 | /// 316 | /// ## Note 317 | /// **Guess** is the operative word here, as there are no guarantees that the contents of the file 318 | /// that `path` points to match the MIME type associated with the path's extension. 319 | /// 320 | /// Take care when processing files with assumptions based on the return value of this function. 321 | #[deprecated(since = "2.0.0", note = "Use `from_path(path).first_raw()` instead")] 322 | pub fn mime_str_for_path_ext>(path: P) -> Option<&'static str> { 323 | from_path(path).first_raw() 324 | } 325 | 326 | /// Get the MIME type associated with a file extension. 327 | /// 328 | /// If there is no association for the extension, or `ext` is empty, 329 | /// `application/octet-stream` is returned. 330 | /// 331 | /// ## Note 332 | /// In HTTP applications, it might be [preferable][rfc7231] to not send a `Content-Type` 333 | /// header at all instead of defaulting to `application/octet-stream`. 334 | /// 335 | /// [rfc7231]: https://tools.ietf.org/html/rfc7231#section-3.1.1.5 336 | #[deprecated( 337 | since = "2.0.0", 338 | note = "use `from_ext(search_ext).first_or_octet_stream()` instead" 339 | )] 340 | pub fn get_mime_type(search_ext: &str) -> Mime { 341 | from_ext(search_ext).first_or_octet_stream() 342 | } 343 | 344 | /// Get the MIME type associated with a file extension. 345 | /// 346 | /// If there is no association for the extension, or `ext` is empty, 347 | /// `None` is returned. 348 | #[deprecated(since = "2.0.0", note = "use `from_ext(search_ext).first()` instead")] 349 | pub fn get_mime_type_opt(search_ext: &str) -> Option { 350 | from_ext(search_ext).first() 351 | } 352 | 353 | /// Get the MIME type string associated with a file extension. Case-insensitive. 354 | /// 355 | /// If `search_ext` is not already lowercase, 356 | /// it will be converted to lowercase to facilitate the search. 357 | /// 358 | /// Returns `None` if `search_ext` is empty or an associated extension was not found. 359 | #[deprecated( 360 | since = "2.0.0", 361 | note = "use `from_ext(search_ext).first_raw()` instead" 362 | )] 363 | pub fn get_mime_type_str(search_ext: &str) -> Option<&'static str> { 364 | from_ext(search_ext).first_raw() 365 | } 366 | 367 | /// Get a list of known extensions for a given `Mime`. 368 | /// 369 | /// Ignores parameters (only searches with `
/`). Case-insensitive (for extension types). 370 | /// 371 | /// Returns `None` if the MIME type is unknown. 372 | /// 373 | /// ### Wildcards 374 | /// If the top-level of the MIME type is a wildcard (`*`), returns all extensions. 375 | /// 376 | /// If the sub-level of the MIME type is a wildcard, returns all extensions for the top-level. 377 | #[cfg(feature = "rev-mappings")] 378 | pub fn get_mime_extensions(mime: &Mime) -> Option<&'static [&'static str]> { 379 | get_extensions(mime.type_().as_ref(), mime.subtype().as_ref()) 380 | } 381 | 382 | /// Get a list of known extensions for a MIME type string. 383 | /// 384 | /// Ignores parameters (only searches `
/`). Case-insensitive. 385 | /// 386 | /// Returns `None` if the MIME type is unknown. 387 | /// 388 | /// ### Wildcards 389 | /// If the top-level of the MIME type is a wildcard (`*`), returns all extensions. 390 | /// 391 | /// If the sub-level of the MIME type is a wildcard, returns all extensions for the top-level. 392 | /// 393 | /// ### Panics 394 | /// If `mime_str` is not a valid MIME type specifier (naive). 395 | #[cfg(feature = "rev-mappings")] 396 | pub fn get_mime_extensions_str(mut mime_str: &str) -> Option<&'static [&'static str]> { 397 | mime_str = mime_str.trim(); 398 | 399 | if let Some(sep_idx) = mime_str.find(';') { 400 | mime_str = &mime_str[..sep_idx]; 401 | } 402 | 403 | let (top, sub) = { 404 | let split_idx = mime_str.find('/')?; 405 | (&mime_str[..split_idx], &mime_str[split_idx + 1..]) 406 | }; 407 | 408 | get_extensions(top, sub) 409 | } 410 | 411 | /// Get the extensions for a given top-level and sub-level of a MIME type 412 | /// (`{toplevel}/{sublevel}`). 413 | /// 414 | /// Returns `None` if `toplevel` or `sublevel` are unknown. 415 | /// 416 | /// ### Wildcards 417 | /// If the top-level of the MIME type is a wildcard (`*`), returns all extensions. 418 | /// 419 | /// If the sub-level of the MIME type is a wildcard, returns all extensions for the top-level. 420 | #[cfg(feature = "rev-mappings")] 421 | pub fn get_extensions(toplevel: &str, sublevel: &str) -> Option<&'static [&'static str]> { 422 | impl_::get_extensions(toplevel, sublevel) 423 | } 424 | 425 | /// Get the MIME type for `application/octet-stream` (generic binary stream) 426 | #[deprecated(since = "2.0.0", note = "use `mime::APPLICATION_OCTET_STREAM` instead")] 427 | pub fn octet_stream() -> Mime { 428 | "application/octet-stream".parse().unwrap() 429 | } 430 | 431 | #[cfg(test)] 432 | mod tests { 433 | include!("mime_types.rs"); 434 | 435 | use super::{expect_mime, from_ext, from_path, get_mime_extensions_str}; 436 | #[allow(deprecated, unused_imports)] 437 | use std::ascii::AsciiExt; 438 | 439 | use std::fmt::Debug; 440 | use std::path::Path; 441 | 442 | #[test] 443 | fn check_type_bounds() { 444 | fn assert_type_bounds() {} 445 | 446 | assert_type_bounds::(); 447 | assert_type_bounds::(); 448 | assert_type_bounds::(); 449 | } 450 | 451 | #[test] 452 | fn test_mime_type_guessing() { 453 | assert_eq!( 454 | from_ext("gif").first_or_octet_stream().to_string(), 455 | "image/gif".to_string() 456 | ); 457 | assert_eq!( 458 | from_ext("TXT").first_or_octet_stream().to_string(), 459 | "text/plain".to_string() 460 | ); 461 | assert_eq!( 462 | from_ext("blahblah").first_or_octet_stream().to_string(), 463 | "application/octet-stream".to_string() 464 | ); 465 | 466 | assert_eq!( 467 | from_path(Path::new("/path/to/file.gif")) 468 | .first_or_octet_stream() 469 | .to_string(), 470 | "image/gif".to_string() 471 | ); 472 | assert_eq!( 473 | from_path("/path/to/file.gif") 474 | .first_or_octet_stream() 475 | .to_string(), 476 | "image/gif".to_string() 477 | ); 478 | } 479 | 480 | #[test] 481 | fn test_mime_type_guessing_opt() { 482 | assert_eq!( 483 | from_ext("gif").first().unwrap().to_string(), 484 | "image/gif".to_string() 485 | ); 486 | assert_eq!( 487 | from_ext("TXT").first().unwrap().to_string(), 488 | "text/plain".to_string() 489 | ); 490 | assert_eq!(from_ext("blahblah").first(), None); 491 | 492 | assert_eq!( 493 | from_path("/path/to/file.gif").first().unwrap().to_string(), 494 | "image/gif".to_string() 495 | ); 496 | assert_eq!(from_path("/path/to/file").first(), None); 497 | } 498 | 499 | #[test] 500 | fn test_are_mime_types_parseable() { 501 | for (_, mimes) in MIME_TYPES { 502 | mimes.iter().for_each(|s| { 503 | expect_mime(s); 504 | }); 505 | } 506 | } 507 | 508 | // RFC: Is this test necessary anymore? --@cybergeek94, 2/1/2016 509 | #[test] 510 | fn test_are_extensions_ascii() { 511 | for (ext, _) in MIME_TYPES { 512 | assert!(ext.is_ascii(), "Extension not ASCII: {:?}", ext); 513 | } 514 | } 515 | 516 | #[test] 517 | fn test_are_extensions_sorted() { 518 | // simultaneously checks the requirement that duplicate extension entries are adjacent 519 | for (&(ext, _), &(n_ext, _)) in MIME_TYPES.iter().zip(MIME_TYPES.iter().skip(1)) { 520 | assert!( 521 | ext <= n_ext, 522 | "Extensions in src/mime_types should be sorted lexicographically 523 | in ascending order. Failed assert: {:?} <= {:?}", 524 | ext, 525 | n_ext 526 | ); 527 | } 528 | } 529 | 530 | #[test] 531 | fn test_get_mime_extensions_str_no_panic_if_bad_mime() { 532 | assert_eq!(get_mime_extensions_str(""), None); 533 | } 534 | } 535 | -------------------------------------------------------------------------------- /src/mime_types.rs: -------------------------------------------------------------------------------- 1 | /// A mapping of known file extensions and their MIME types. 2 | /// 3 | /// Required to be sorted lexicographically by extension for ease of maintenance. 4 | /// 5 | /// Multiple MIME types per extension are supported; the order is arbitrary but the first should be 6 | /// the most prevalent by most recent RFC declaration or explicit succession of other media types. 7 | /// 8 | /// NOTE: when adding or modifying entries, please include a citation in the commit message. 9 | /// If a media type for an extension changed by official IETF RFC, please keep the old entry but add 10 | /// the new one before it in the slice literal, e.g.: 11 | /// 12 | /// ```ignore 13 | /// - ("md", &["text/x-markdown"]), 14 | /// + ("md", &["text/markdown", "text/x-markdown"]), 15 | /// ``` 16 | /// 17 | /// Sourced from: 18 | /// https://github.com/samuelneff/MimeTypeMap/blob/master/src/MimeTypes/MimeTypeMap.cs 19 | /// https://github.com/jshttp/mime-db extracted with https://gist.github.com/soyuka/b7e29d359b2c14c21bdead923c01cc81 20 | pub static MIME_TYPES: &[(&str, &[&str])] = &[ 21 | ("123", &["application/vnd.lotus-1-2-3"]), 22 | ("323", &["text/h323"]), 23 | ("3dml", &["text/vnd.in3d.3dml"]), 24 | ("3ds", &["image/x-3ds"]), 25 | ("3g2", &["video/3gpp2"]), 26 | ("3gp", &["video/3gpp"]), 27 | ("3gp2", &["video/3gpp2"]), 28 | ("3gpp", &["video/3gpp"]), 29 | ("7z", &["application/x-7z-compressed"]), 30 | ("aa", &["audio/audible"]), 31 | ("aab", &["application/x-authorware-bin"]), 32 | ("aac", &["audio/aac"]), 33 | ("aaf", &["application/octet-stream"]), 34 | ("aam", &["application/x-authorware-map"]), 35 | ("aas", &["application/x-authorware-seg"]), 36 | ("aax", &["audio/vnd.audible.aax"]), 37 | ("abw", &["application/x-abiword"]), 38 | ("ac", &["application/pkix-attr-cert"]), 39 | ("ac3", &["audio/ac3"]), 40 | ("aca", &["application/octet-stream"]), 41 | ("acc", &["application/vnd.americandynamics.acc"]), 42 | ("accda", &["application/msaccess.addin"]), 43 | ("accdb", &["application/msaccess"]), 44 | ("accdc", &["application/msaccess.cab"]), 45 | ("accde", &["application/msaccess"]), 46 | ("accdr", &["application/msaccess.runtime"]), 47 | ("accdt", &["application/msaccess"]), 48 | ("accdw", &["application/msaccess.webapplication"]), 49 | ("accft", &["application/msaccess.ftemplate"]), 50 | ("ace", &["application/x-ace-compressed"]), 51 | ("acu", &["application/vnd.acucobol"]), 52 | ("acutc", &["application/vnd.acucorp"]), 53 | ("acx", &["application/internet-property-stream"]), 54 | ("addin", &["text/xml"]), 55 | ("ade", &["application/msaccess"]), 56 | ("adobebridge", &["application/x-bridge-url"]), 57 | ("adp", &["application/msaccess"]), 58 | ("adt", &["audio/vnd.dlna.adts"]), 59 | ("adts", &["audio/aac"]), 60 | ("aep", &["application/vnd.audiograph"]), 61 | ("afm", &["application/octet-stream"]), 62 | ("afp", &["application/vnd.ibm.modcap"]), 63 | ("ahead", &["application/vnd.ahead.space"]), 64 | ("ai", &["application/postscript"]), 65 | ("aif", &["audio/aiff"]), 66 | ("aifc", &["audio/aiff"]), 67 | ("aiff", &["audio/aiff"]), 68 | ( 69 | "air", 70 | &["application/vnd.adobe.air-application-installer-package+zip"], 71 | ), 72 | ("ait", &["application/vnd.dvb.ait"]), 73 | ("amc", &["application/mpeg"]), 74 | ("ami", &["application/vnd.amiga.ami"]), 75 | ("anx", &["application/annodex"]), 76 | ("apk", &["application/vnd.android.package-archive"]), 77 | ("apng", &["image/apng"]), 78 | ("appcache", &["text/cache-manifest"]), 79 | ("application", &["application/x-ms-application"]), 80 | ("apr", &["application/vnd.lotus-approach"]), 81 | ("arc", &["application/x-freearc"]), 82 | ("arj", &["application/x-arj"]), 83 | ("art", &["image/x-jg"]), 84 | ("arw", &["image/x-sony-arw"]), 85 | ("asa", &["application/xml"]), 86 | ("asax", &["application/xml"]), 87 | ("asc", &["application/pgp-signature"]), 88 | ("ascx", &["application/xml"]), 89 | ("asd", &["application/octet-stream"]), 90 | ("asf", &["video/x-ms-asf"]), 91 | ("ashx", &["application/xml"]), 92 | ("asi", &["application/octet-stream"]), 93 | ("asm", &["text/plain"]), 94 | ("asmx", &["application/xml"]), 95 | ("aso", &["application/vnd.accpac.simply.aso"]), 96 | ("aspx", &["application/xml"]), 97 | ("asr", &["video/x-ms-asf"]), 98 | ("asx", &["video/x-ms-asf"]), 99 | ("atc", &["application/vnd.acucorp"]), 100 | ("atom", &["application/atom+xml"]), 101 | ("atomcat", &["application/atomcat+xml"]), 102 | ("atomsvc", &["application/atomsvc+xml"]), 103 | ("atx", &["application/vnd.antix.game-component"]), 104 | ("au", &["audio/basic"]), 105 | ("avi", &["video/x-msvideo"]), 106 | ("avif", &["image/avif"]), 107 | ("avifs", &["image/avif-sequence"]), 108 | ("aw", &["application/applixware"]), 109 | ("axa", &["audio/annodex"]), 110 | ("axs", &["application/olescript"]), 111 | ("axv", &["video/annodex"]), 112 | ("azf", &["application/vnd.airzip.filesecure.azf"]), 113 | ("azs", &["application/vnd.airzip.filesecure.azs"]), 114 | ("azw", &["application/vnd.amazon.ebook"]), 115 | ("bas", &["text/plain"]), 116 | ("bat", &["application/x-msdownload"]), 117 | ("bcpio", &["application/x-bcpio"]), 118 | ("bdf", &["application/x-font-bdf"]), 119 | ("bdm", &["application/vnd.syncml.dm+wbxml"]), 120 | ("bdoc", &["application/bdoc"]), 121 | ("bed", &["application/vnd.realvnc.bed"]), 122 | ("bh2", &["application/vnd.fujitsu.oasysprs"]), 123 | ("bin", &["application/octet-stream"]), 124 | ("blb", &["application/x-blorb"]), 125 | ("blorb", &["application/x-blorb"]), 126 | ("bmi", &["application/vnd.bmi"]), 127 | ("bmp", &["image/bmp"]), 128 | ("book", &["application/vnd.framemaker"]), 129 | ("box", &["application/vnd.previewsystems.box"]), 130 | ("boz", &["application/x-bzip2"]), 131 | ("bpk", &["application/octet-stream"]), 132 | ("btif", &["image/prs.btif"]), 133 | ("buffer", &["application/octet-stream"]), 134 | ("bz", &["application/x-bzip"]), 135 | ("bz2", &["application/x-bzip2"]), 136 | ("c", &["text/plain"]), 137 | ("c11amc", &["application/vnd.cluetrust.cartomobile-config"]), 138 | ( 139 | "c11amz", 140 | &["application/vnd.cluetrust.cartomobile-config-pkg"], 141 | ), 142 | ("c4d", &["application/vnd.clonk.c4group"]), 143 | ("c4f", &["application/vnd.clonk.c4group"]), 144 | ("c4g", &["application/vnd.clonk.c4group"]), 145 | ("c4p", &["application/vnd.clonk.c4group"]), 146 | ("c4u", &["application/vnd.clonk.c4group"]), 147 | ("cab", &["application/octet-stream"]), 148 | ("caf", &["audio/x-caf"]), 149 | ("calx", &["application/vnd.ms-office.calx"]), 150 | ("cap", &["application/vnd.tcpdump.pcap"]), 151 | ("car", &["application/vnd.curl.car"]), 152 | ("cat", &["application/vnd.ms-pki.seccat"]), 153 | ("cb7", &["application/x-cbr"]), 154 | ("cba", &["application/x-cbr"]), 155 | ("cbr", &["application/x-cbr"]), 156 | ("cbt", &["application/x-cbr"]), 157 | ("cbz", &["application/x-cbr"]), 158 | ("cc", &["text/plain"]), 159 | ("cco", &["application/x-cocoa"]), 160 | ("cct", &["application/x-director"]), 161 | ("ccxml", &["application/ccxml+xml"]), 162 | ("cd", &["text/plain"]), 163 | ("cdbcmsg", &["application/vnd.contact.cmsg"]), 164 | ("cdda", &["audio/aiff"]), 165 | ("cdf", &["application/x-cdf"]), 166 | ("cdkey", &["application/vnd.mediastation.cdkey"]), 167 | ("cdmia", &["application/cdmi-capability"]), 168 | ("cdmic", &["application/cdmi-container"]), 169 | ("cdmid", &["application/cdmi-domain"]), 170 | ("cdmio", &["application/cdmi-object"]), 171 | ("cdmiq", &["application/cdmi-queue"]), 172 | ("cdx", &["chemical/x-cdx"]), 173 | ("cdxml", &["application/vnd.chemdraw+xml"]), 174 | ("cdy", &["application/vnd.cinderella"]), 175 | ("cer", &["application/x-x509-ca-cert"]), 176 | ("cfg", &["text/plain"]), 177 | ("cfs", &["application/x-cfs-compressed"]), 178 | ("cgm", &["image/cgm"]), 179 | ("chat", &["application/x-chat"]), 180 | ("chm", &["application/vnd.ms-htmlhelp"]), 181 | ("chrt", &["application/vnd.kde.kchart"]), 182 | ("cif", &["chemical/x-cif"]), 183 | ( 184 | "cii", 185 | &["application/vnd.anser-web-certificate-issue-initiation"], 186 | ), 187 | ("cil", &["application/vnd.ms-artgalry"]), 188 | ("cla", &["application/vnd.claymore"]), 189 | ("class", &["application/x-java-applet"]), 190 | ("clkk", &["application/vnd.crick.clicker.keyboard"]), 191 | ("clkp", &["application/vnd.crick.clicker.palette"]), 192 | ("clkt", &["application/vnd.crick.clicker.template"]), 193 | ("clkw", &["application/vnd.crick.clicker.wordbank"]), 194 | ("clkx", &["application/vnd.crick.clicker"]), 195 | ("clp", &["application/x-msclip"]), 196 | ("cmc", &["application/vnd.cosmocaller"]), 197 | ("cmd", &["text/plain"]), 198 | ("cmdf", &["chemical/x-cmdf"]), 199 | ("cml", &["chemical/x-cml"]), 200 | ("cmp", &["application/vnd.yellowriver-custom-menu"]), 201 | ("cmx", &["image/x-cmx"]), 202 | ("cnf", &["text/plain"]), 203 | ("cod", &["image/cis-cod"]), 204 | ("coffee", &["text/coffeescript"]), 205 | ("com", &["application/x-msdownload"]), 206 | ("conf", &["text/plain"]), 207 | ("config", &["application/xml"]), 208 | ("contact", &["text/x-ms-contact"]), 209 | ("coverage", &["application/xml"]), 210 | ("cpio", &["application/x-cpio"]), 211 | ("cpp", &["text/plain"]), 212 | ("cpt", &["application/mac-compactpro"]), 213 | ("cr2", &["image/x-canon-cr2"]), 214 | ("cr3", &["image/x-canon-cr3"]), 215 | ("crd", &["application/x-mscardfile"]), 216 | ("crl", &["application/pkix-crl"]), 217 | ("crt", &["application/x-x509-ca-cert"]), 218 | ("crw", &["image/x-canon-crw"]), 219 | ("crx", &["application/x-chrome-extension"]), 220 | ("cryptonote", &["application/vnd.rig.cryptonote"]), 221 | ("cs", &["text/plain"]), 222 | ("csdproj", &["text/plain"]), 223 | ("csh", &["application/x-csh"]), 224 | ("csl", &["application/vnd.citationstyles.style+xml"]), 225 | ("csml", &["chemical/x-csml"]), 226 | ("csp", &["application/vnd.commonspace"]), 227 | ("csproj", &["text/plain"]), 228 | ("css", &["text/css"]), 229 | ("cst", &["application/x-director"]), 230 | ("csv", &["text/csv"]), 231 | ("cu", &["application/cu-seeme"]), 232 | ("cur", &["application/octet-stream"]), 233 | ("curl", &["text/vnd.curl"]), 234 | ("cww", &["application/prs.cww"]), 235 | ("cxt", &["application/x-director"]), 236 | ("cxx", &["text/plain"]), 237 | ("dae", &["model/vnd.collada+xml"]), 238 | ("daf", &["application/vnd.mobius.daf"]), 239 | ("dart", &["application/vnd.dart"]), 240 | ("dat", &["application/octet-stream"]), 241 | ("dataless", &["application/vnd.fdsn.seed"]), 242 | ("datasource", &["application/xml"]), 243 | ("davmount", &["application/davmount+xml"]), 244 | ("dbk", &["application/docbook+xml"]), 245 | ("dbproj", &["text/plain"]), 246 | ("dcr", &[ 247 | "application/x-director", 248 | "image/x-kodak-dcr", 249 | ]), 250 | ("dcurl", &["text/vnd.curl.dcurl"]), 251 | ("dd2", &["application/vnd.oma.dd2+xml"]), 252 | ("ddd", &["application/vnd.fujixerox.ddd"]), 253 | ("deb", &["application/octet-stream"]), 254 | ("def", &["text/plain"]), 255 | ("deploy", &["application/octet-stream"]), 256 | ("der", &["application/x-x509-ca-cert"]), 257 | ("dfac", &["application/vnd.dreamfactory"]), 258 | ("dgc", &["application/x-dgc-compressed"]), 259 | ("dgml", &["application/xml"]), 260 | ("dib", &["image/bmp"]), 261 | ("dic", &["text/x-c"]), 262 | ("dif", &["video/x-dv"]), 263 | ("dir", &["application/x-director"]), 264 | ("dis", &["application/vnd.mobius.dis"]), 265 | ("disco", &["text/xml"]), 266 | ( 267 | "disposition-notification", 268 | &["message/disposition-notification"], 269 | ), 270 | ("dist", &["application/octet-stream"]), 271 | ("distz", &["application/octet-stream"]), 272 | ("divx", &["video/divx"]), 273 | ("djv", &["image/vnd.djvu"]), 274 | ("djvu", &["image/vnd.djvu"]), 275 | ("dll", &["application/x-msdownload"]), 276 | ("dll.config", &["text/xml"]), 277 | ("dlm", &["text/dlm"]), 278 | ("dmg", &["application/octet-stream"]), 279 | ("dmp", &["application/vnd.tcpdump.pcap"]), 280 | ("dms", &["application/octet-stream"]), 281 | ("dna", &["application/vnd.dna"]), 282 | ("dng", &["image/x-adobe-dng"]), 283 | ("doc", &["application/msword"]), 284 | ( 285 | "docm", 286 | &["application/vnd.ms-word.document.macroEnabled.12"], 287 | ), 288 | ( 289 | "docx", 290 | &["application/vnd.openxmlformats-officedocument.wordprocessingml.document"], 291 | ), 292 | ("dot", &["application/msword"]), 293 | ( 294 | "dotm", 295 | &["application/vnd.ms-word.template.macroEnabled.12"], 296 | ), 297 | ( 298 | "dotx", 299 | &["application/vnd.openxmlformats-officedocument.wordprocessingml.template"], 300 | ), 301 | ("dp", &["application/vnd.osgi.dp"]), 302 | ("dpg", &["application/vnd.dpgraph"]), 303 | ("dra", &["audio/vnd.dra"]), 304 | ("dsc", &["text/prs.lines.tag"]), 305 | ("dsp", &["application/octet-stream"]), 306 | ("dssc", &["application/dssc+der"]), 307 | ("dsw", &["text/plain"]), 308 | ("dtb", &["application/x-dtbook+xml"]), 309 | ("dtd", &["text/xml"]), 310 | ("dts", &["audio/vnd.dts"]), 311 | ("dtsconfig", &["text/xml"]), 312 | ("dtshd", &["audio/vnd.dts.hd"]), 313 | ("dump", &["application/octet-stream"]), 314 | ("dv", &["video/x-dv"]), 315 | ("dvb", &["video/vnd.dvb.file"]), 316 | ("dvi", &["application/x-dvi"]), 317 | ("dwf", &["drawing/x-dwf"]), 318 | ("dwg", &["application/acad"]), 319 | ("dwp", &["application/octet-stream"]), 320 | ("dxf", &["application/x-dxf"]), 321 | ("dxp", &["application/vnd.spotfire.dxp"]), 322 | ("dxr", &["application/x-director"]), 323 | ("ear", &["application/java-archive"]), 324 | ("ecelp4800", &["audio/vnd.nuera.ecelp4800"]), 325 | ("ecelp7470", &["audio/vnd.nuera.ecelp7470"]), 326 | ("ecelp9600", &["audio/vnd.nuera.ecelp9600"]), 327 | ("ecma", &["text/javascript"]), 328 | ("edm", &["application/vnd.novadigm.edm"]), 329 | ("edx", &["application/vnd.novadigm.edx"]), 330 | ("efif", &["application/vnd.picsel"]), 331 | ("ei6", &["application/vnd.pg.osasli"]), 332 | ("elc", &["application/octet-stream"]), 333 | ("emf", &["application/x-msmetafile"]), 334 | ("eml", &["message/rfc822"]), 335 | ("emma", &["application/emma+xml"]), 336 | ("emz", &["application/octet-stream"]), 337 | ("eol", &["audio/vnd.digital-winds"]), 338 | ("eot", &["application/vnd.ms-fontobject"]), 339 | ("eps", &["application/postscript"]), 340 | ("epub", &["application/epub+zip"]), 341 | ("erf", &[ 342 | "application/x-endace-erf", 343 | "image/x-epson-erf", 344 | ]), 345 | ("es", &["text/javascript"]), 346 | ("es3", &["application/vnd.eszigno3+xml"]), 347 | ("esa", &["application/vnd.osgi.subsystem"]), 348 | ("esf", &["application/vnd.epson.esf"]), 349 | ("et3", &["application/vnd.eszigno3+xml"]), 350 | ("etl", &["application/etl"]), 351 | ("etx", &["text/x-setext"]), 352 | ("eva", &["application/x-eva"]), 353 | ("evy", &["application/envoy"]), 354 | ("exe", &["application/octet-stream"]), 355 | ("exe.config", &["text/xml"]), 356 | ("exi", &["application/exi"]), 357 | ("ext", &["application/vnd.novadigm.ext"]), 358 | ("ez", &["application/andrew-inset"]), 359 | ("ez2", &["application/vnd.ezpix-album"]), 360 | ("ez3", &["application/vnd.ezpix-package"]), 361 | ("f", &["text/x-fortran"]), 362 | ("f4v", &["video/x-f4v"]), 363 | ("f77", &["text/x-fortran"]), 364 | ("f90", &["text/x-fortran"]), 365 | ("fbs", &["image/vnd.fastbidsheet"]), 366 | ("fcdt", &["application/vnd.adobe.formscentral.fcdt"]), 367 | ("fcs", &["application/vnd.isac.fcs"]), 368 | ("fdf", &["application/vnd.fdf"]), 369 | ("fe_launch", &["application/vnd.denovo.fcselayout-link"]), 370 | ("feature", &["text/x-gherkin"]), 371 | ("fg5", &["application/vnd.fujitsu.oasysgp"]), 372 | ("fgd", &["application/x-director"]), 373 | ("fh", &["image/x-freehand"]), 374 | ("fh4", &["image/x-freehand"]), 375 | ("fh5", &["image/x-freehand"]), 376 | ("fh7", &["image/x-freehand"]), 377 | ("fhc", &["image/x-freehand"]), 378 | ("fif", &["application/fractals"]), 379 | ("fig", &["application/x-xfig"]), 380 | ("filters", &["application/xml"]), 381 | ("fla", &["application/octet-stream"]), 382 | ("flac", &["audio/flac"]), 383 | ("fli", &["video/x-fli"]), 384 | ("flo", &["application/vnd.micrografx.flo"]), 385 | ("flr", &["x-world/x-vrml"]), 386 | ("flv", &["video/x-flv"]), 387 | ("flw", &["application/vnd.kde.kivio"]), 388 | ("flx", &["text/vnd.fmi.flexstor"]), 389 | ("fly", &["text/vnd.fly"]), 390 | ("fm", &["application/vnd.framemaker"]), 391 | ("fnc", &["application/vnd.frogans.fnc"]), 392 | ("for", &["text/x-fortran"]), 393 | ("fpx", &["image/vnd.fpx"]), 394 | ("frame", &["application/vnd.framemaker"]), 395 | ("fsc", &["application/vnd.fsc.weblaunch"]), 396 | ("fsscript", &["application/fsharp-script"]), 397 | ("fst", &["image/vnd.fst"]), 398 | ("fsx", &["application/fsharp-script"]), 399 | ("ftc", &["application/vnd.fluxtime.clip"]), 400 | ( 401 | "fti", 402 | &["application/vnd.anser-web-funds-transfer-initiation"], 403 | ), 404 | ("fvt", &["video/vnd.fvt"]), 405 | ("fxp", &["application/vnd.adobe.fxp"]), 406 | ("fxpl", &["application/vnd.adobe.fxp"]), 407 | ("fzs", &["application/vnd.fuzzysheet"]), 408 | ("g2w", &["application/vnd.geoplan"]), 409 | ("g3", &["image/g3fax"]), 410 | ("g3w", &["application/vnd.geospace"]), 411 | ("gac", &["application/vnd.groove-account"]), 412 | ("gam", &["application/x-tads"]), 413 | ("gbr", &["application/rpki-ghostbusters"]), 414 | ("gca", &["application/x-gca-compressed"]), 415 | ("gdl", &["model/vnd.gdl"]), 416 | ("gdoc", &["application/vnd.google-apps.document"]), 417 | ("gemini", &["text/gemini"]), 418 | ("generictest", &["application/xml"]), 419 | ("geo", &["application/vnd.dynageo"]), 420 | ("geojson", &["application/geo+json"]), 421 | ("gex", &["application/vnd.geometry-explorer"]), 422 | ("ggb", &["application/vnd.geogebra.file"]), 423 | ("ggt", &["application/vnd.geogebra.tool"]), 424 | ("ghf", &["application/vnd.groove-help"]), 425 | ("gif", &["image/gif"]), 426 | ("gim", &["application/vnd.groove-identity-message"]), 427 | ("glb", &["model/gltf-binary"]), 428 | ("gltf", &["model/gltf+json"]), 429 | ("gmi", &["text/gemini"]), 430 | ("gml", &["application/gml+xml"]), 431 | ("gmx", &["application/vnd.gmx"]), 432 | ("gnumeric", &["application/x-gnumeric"]), 433 | ("gph", &["application/vnd.flographit"]), 434 | ("gpx", &["application/gpx+xml"]), 435 | ("gqf", &["application/vnd.grafeq"]), 436 | ("gqs", &["application/vnd.grafeq"]), 437 | ("gram", &["application/srgs"]), 438 | ("gramps", &["application/x-gramps-xml"]), 439 | ("gre", &["application/vnd.geometry-explorer"]), 440 | ("group", &["text/x-ms-group"]), 441 | ("grv", &["application/vnd.groove-injector"]), 442 | ("grxml", &["application/srgs+xml"]), 443 | ("gsf", &["application/x-font-ghostscript"]), 444 | ("gsheet", &["application/vnd.google-apps.spreadsheet"]), 445 | ("gslides", &["application/vnd.google-apps.presentation"]), 446 | ("gsm", &["audio/x-gsm"]), 447 | ("gtar", &["application/x-gtar"]), 448 | ("gtm", &["application/vnd.groove-tool-message"]), 449 | ("gtw", &["model/vnd.gtw"]), 450 | ("gv", &["text/vnd.graphviz"]), 451 | ("gxf", &["application/gxf"]), 452 | ("gxt", &["application/vnd.geonext"]), 453 | ("gz", &["application/gzip", "application/x-gzip"]), 454 | ("h", &["text/plain"]), 455 | ("h261", &["video/h261"]), 456 | ("h263", &["video/h263"]), 457 | ("h264", &["video/h264"]), 458 | ("hal", &["application/vnd.hal+xml"]), 459 | ("hbci", &["application/vnd.hbci"]), 460 | ("hbs", &["text/x-handlebars-template"]), 461 | ("hdd", &["application/x-virtualbox-hdd"]), 462 | ("hdf", &["application/x-hdf"]), 463 | ("hdml", &["text/x-hdml"]), 464 | ("hdr", &["image/vnd.radiance"]), 465 | ("heic", &["image/heic"]), 466 | ("heics", &["image/heic-sequence"]), 467 | ("heif", &["image/heif"]), 468 | ("heifs", &["image/heif-sequence"]), 469 | ("hh", &["text/plain"]), 470 | ("hhc", &["application/x-oleobject"]), 471 | ("hhk", &["application/octet-stream"]), 472 | ("hhp", &["application/octet-stream"]), 473 | ("hjson", &["application/hjson"]), 474 | ("hlp", &["application/winhlp"]), 475 | ("hpgl", &["application/vnd.hp-hpgl"]), 476 | ("hpid", &["application/vnd.hp-hpid"]), 477 | ("hpp", &["text/plain"]), 478 | ("hps", &["application/vnd.hp-hps"]), 479 | ("hqx", &["application/mac-binhex40"]), 480 | ("hta", &["application/hta"]), 481 | ("htc", &["text/x-component"]), 482 | ("htke", &["application/vnd.kenameaapp"]), 483 | ("htm", &["text/html"]), 484 | ("html", &["text/html"]), 485 | ("htt", &["text/webviewhtml"]), 486 | ("hvd", &["application/vnd.yamaha.hv-dic"]), 487 | ("hvp", &["application/vnd.yamaha.hv-voice"]), 488 | ("hvs", &["application/vnd.yamaha.hv-script"]), 489 | ("hxa", &["application/xml"]), 490 | ("hxc", &["application/xml"]), 491 | ("hxd", &["application/octet-stream"]), 492 | ("hxe", &["application/xml"]), 493 | ("hxf", &["application/xml"]), 494 | ("hxh", &["application/octet-stream"]), 495 | ("hxi", &["application/octet-stream"]), 496 | ("hxk", &["application/xml"]), 497 | ("hxq", &["application/octet-stream"]), 498 | ("hxr", &["application/octet-stream"]), 499 | ("hxs", &["application/octet-stream"]), 500 | ("hxt", &["text/html"]), 501 | ("hxv", &["application/xml"]), 502 | ("hxw", &["application/octet-stream"]), 503 | ("hxx", &["text/plain"]), 504 | ("i", &["text/plain"]), 505 | ("i2g", &["application/vnd.intergeo"]), 506 | ("icc", &["application/vnd.iccprofile"]), 507 | ("ice", &["x-conference/x-cooltalk"]), 508 | ("icm", &["application/vnd.iccprofile"]), 509 | ("ico", &["image/x-icon"]), 510 | ("ics", &["text/calendar"]), 511 | ("idl", &["text/plain"]), 512 | ("ief", &["image/ief"]), 513 | ("ifb", &["text/calendar"]), 514 | ("ifm", &["application/vnd.shana.informed.formdata"]), 515 | ("iges", &["model/iges"]), 516 | ("igl", &["application/vnd.igloader"]), 517 | ("igm", &["application/vnd.insors.igm"]), 518 | ("igs", &["model/iges"]), 519 | ("igx", &["application/vnd.micrografx.igx"]), 520 | ("iif", &["application/vnd.shana.informed.interchange"]), 521 | ("iii", &["application/x-iphone"]), 522 | ("img", &["application/octet-stream"]), 523 | ("imp", &["application/vnd.accpac.simply.imp"]), 524 | ("ims", &["application/vnd.ms-ims"]), 525 | ("in", &["text/plain"]), 526 | ("inc", &["text/plain"]), 527 | ("inf", &["application/octet-stream"]), 528 | ("ini", &["text/plain"]), 529 | ("ink", &["application/inkml+xml"]), 530 | ("inkml", &["application/inkml+xml"]), 531 | ("inl", &["text/plain"]), 532 | ("ins", &["application/x-internet-signup"]), 533 | ("install", &["application/x-install-instructions"]), 534 | ("iota", &["application/vnd.astraea-software.iota"]), 535 | ("ipa", &["application/x-itunes-ipa"]), 536 | ("ipfix", &["application/ipfix"]), 537 | ("ipg", &["application/x-itunes-ipg"]), 538 | ("ipk", &["application/vnd.shana.informed.package"]), 539 | ("ipproj", &["text/plain"]), 540 | ("ipsw", &["application/x-itunes-ipsw"]), 541 | ("iqy", &["text/x-ms-iqy"]), 542 | ("irm", &["application/vnd.ibm.rights-management"]), 543 | ("irp", &["application/vnd.irepository.package+xml"]), 544 | ("iso", &["application/octet-stream"]), 545 | ("isp", &["application/x-internet-signup"]), 546 | ("ite", &["application/x-itunes-ite"]), 547 | ("itlp", &["application/x-itunes-itlp"]), 548 | ("itms", &["application/x-itunes-itms"]), 549 | ("itp", &["application/vnd.shana.informed.formtemplate"]), 550 | ("itpc", &["application/x-itunes-itpc"]), 551 | ("ivf", &["video/x-ivf"]), 552 | ("ivp", &["application/vnd.immervision-ivp"]), 553 | ("ivu", &["application/vnd.immervision-ivu"]), 554 | ("jad", &["text/vnd.sun.j2me.app-descriptor"]), 555 | ("jade", &["text/jade"]), 556 | ("jam", &["application/vnd.jam"]), 557 | ("jar", &["application/java-archive"]), 558 | ("jardiff", &["application/x-java-archive-diff"]), 559 | ("java", &["application/octet-stream"]), 560 | ("jck", &["application/liquidmotion"]), 561 | ("jcz", &["application/liquidmotion"]), 562 | ("jfif", &["image/jpeg"]), 563 | ("jisp", &["application/vnd.jisp"]), 564 | ("jlt", &["application/vnd.hp-jlyt"]), 565 | ("jng", &["image/x-jng"]), 566 | ("jnlp", &["application/x-java-jnlp-file"]), 567 | ("joda", &["application/vnd.joost.joda-archive"]), 568 | ("jp2", &["image/jp2"]), 569 | ("jpb", &["application/octet-stream"]), 570 | ("jpe", &["image/jpeg"]), 571 | ("jpeg", &["image/jpeg"]), 572 | ("jpf", &["image/jpx"]), 573 | ("jpg", &["image/jpeg"]), 574 | ("jpg2", &["image/jp2"]), 575 | ("jpgm", &["video/jpm"]), 576 | ("jpgv", &["video/jpeg"]), 577 | ("jpm", &["image/jpm"]), 578 | ("jpx", &["image/jpx"]), 579 | ("js", &["text/javascript"]), 580 | ("jsm", &["text/javascript"]), 581 | ("json", &["application/json"]), 582 | ("json5", &["application/json5"]), 583 | ("jsonld", &["application/ld+json"]), 584 | ("jsonml", &["application/jsonml+json"]), 585 | ("jsx", &["text/javascript"]), 586 | ("jsxbin", &["text/plain"]), 587 | ("jxl", &["image/jxl"]), 588 | ("k25", &["image/x-kodak-k25"]), 589 | ("kar", &["audio/midi"]), 590 | ("karbon", &["application/vnd.kde.karbon"]), 591 | ("kdc", &["image/x-kodak-kdc"]), 592 | ("kfo", &["application/vnd.kde.kformula"]), 593 | ("kia", &["application/vnd.kidspiration"]), 594 | ("kml", &["application/vnd.google-earth.kml+xml"]), 595 | ("kmz", &["application/vnd.google-earth.kmz"]), 596 | ("kne", &["application/vnd.kinar"]), 597 | ("knp", &["application/vnd.kinar"]), 598 | ("kon", &["application/vnd.kde.kontour"]), 599 | ("kpr", &["application/vnd.kde.kpresenter"]), 600 | ("kpt", &["application/vnd.kde.kpresenter"]), 601 | ("kpxx", &["application/vnd.ds-keypoint"]), 602 | ("ksp", &["application/vnd.kde.kspread"]), 603 | ("ktr", &["application/vnd.kahootz"]), 604 | ("ktx", &["image/ktx"]), 605 | ("ktz", &["application/vnd.kahootz"]), 606 | ("kwd", &["application/vnd.kde.kword"]), 607 | ("kwt", &["application/vnd.kde.kword"]), 608 | ("lasxml", &["application/vnd.las.las+xml"]), 609 | ("latex", &["application/x-latex"]), 610 | ( 611 | "lbd", 612 | &["application/vnd.llamagraphics.life-balance.desktop"], 613 | ), 614 | ( 615 | "lbe", 616 | &["application/vnd.llamagraphics.life-balance.exchange+xml"], 617 | ), 618 | ("les", &["application/vnd.hhe.lesson-player"]), 619 | ("less", &["text/less"]), 620 | ("lha", &["application/x-lzh-compressed"]), 621 | ("library-ms", &["application/windows-library+xml"]), 622 | ("link66", &["application/vnd.route66.link66+xml"]), 623 | ("list", &["text/plain"]), 624 | ("list3820", &["application/vnd.ibm.modcap"]), 625 | ("listafp", &["application/vnd.ibm.modcap"]), 626 | ("lit", &["application/x-ms-reader"]), 627 | ("litcoffee", &["text/coffeescript"]), 628 | ("lnk", &["application/x-ms-shortcut"]), 629 | ("loadtest", &["application/xml"]), 630 | ("log", &["text/plain"]), 631 | ("lostxml", &["application/lost+xml"]), 632 | ("lpk", &["application/octet-stream"]), 633 | ("lrf", &["application/octet-stream"]), 634 | ("lrm", &["application/vnd.ms-lrm"]), 635 | ("lsf", &["video/x-la-asf"]), 636 | ("lst", &["text/plain"]), 637 | ("lsx", &["video/x-la-asf"]), 638 | ("ltf", &["application/vnd.frogans.ltf"]), 639 | ("lua", &["text/x-lua"]), 640 | ("luac", &["application/x-lua-bytecode"]), 641 | ("lvp", &["audio/vnd.lucent.voice"]), 642 | ("lwp", &["application/vnd.lotus-wordpro"]), 643 | ("lzh", &["application/octet-stream"]), 644 | ("m13", &["application/x-msmediaview"]), 645 | ("m14", &["application/x-msmediaview"]), 646 | ("m1v", &["video/mpeg"]), 647 | ("m21", &["application/mp21"]), 648 | ("m2a", &["audio/mpeg"]), 649 | ("m2t", &["video/vnd.dlna.mpeg-tts"]), 650 | ("m2ts", &["video/vnd.dlna.mpeg-tts"]), 651 | ("m2v", &["video/mpeg"]), 652 | ("m3a", &["audio/mpeg"]), 653 | ("m3u", &["audio/x-mpegurl"]), 654 | ("m3u8", &["audio/x-mpegurl"]), 655 | ("m4a", &["audio/m4a"]), 656 | ("m4b", &["audio/m4b"]), 657 | ("m4p", &["audio/m4p"]), 658 | ("m4r", &["audio/x-m4r"]), 659 | ("m4u", &["video/vnd.mpegurl"]), 660 | ("m4v", &["video/x-m4v"]), 661 | ("ma", &["application/mathematica"]), 662 | ("mac", &["image/x-macpaint"]), 663 | ("mads", &["application/mads+xml"]), 664 | ("mag", &["application/vnd.ecowin.chart"]), 665 | ("mak", &["text/plain"]), 666 | ("maker", &["application/vnd.framemaker"]), 667 | ("man", &["application/x-troff-man"]), 668 | ("manifest", &["application/x-ms-manifest"]), 669 | ("map", &["text/plain"]), 670 | ("mar", &["application/octet-stream"]), 671 | ("markdown", &["text/markdown"]), 672 | ("master", &["application/xml"]), 673 | ("mathml", &["application/mathml+xml"]), 674 | ("mb", &["application/mathematica"]), 675 | ("mbk", &["application/vnd.mobius.mbk"]), 676 | ("mbox", &["application/mbox"]), 677 | ("mc1", &["application/vnd.medcalcdata"]), 678 | ("mcd", &["application/vnd.mcd"]), 679 | ("mcurl", &["text/vnd.curl.mcurl"]), 680 | ("md", &["text/markdown", "text/x-markdown"]), 681 | ("mda", &["application/msaccess"]), 682 | ("mdb", &["application/x-msaccess"]), 683 | ("mde", &["application/msaccess"]), 684 | ("mdi", &["image/vnd.ms-modi"]), 685 | ("mdp", &["application/octet-stream"]), 686 | ("me", &["application/x-troff-me"]), 687 | ("mesh", &["model/mesh"]), 688 | ("meta4", &["application/metalink4+xml"]), 689 | ("metalink", &["application/metalink+xml"]), 690 | ("mets", &["application/mets+xml"]), 691 | ("mfm", &["application/vnd.mfmp"]), 692 | ("mfp", &["application/x-shockwave-flash"]), 693 | ("mft", &["application/rpki-manifest"]), 694 | ("mgp", &["application/vnd.osgeo.mapguide.package"]), 695 | ("mgz", &["application/vnd.proteus.magazine"]), 696 | ("mht", &["message/rfc822"]), 697 | ("mhtml", &["message/rfc822"]), 698 | ("mid", &["audio/mid"]), 699 | ("midi", &["audio/mid"]), 700 | ("mie", &["application/x-mie"]), 701 | ("mif", &["application/vnd.mif"]), 702 | ("mime", &["message/rfc822"]), 703 | ("mix", &["application/octet-stream"]), 704 | ("mj2", &["video/mj2"]), 705 | ("mjp2", &["video/mj2"]), 706 | ("mjs", &["application/javascript"]), 707 | ("mk", &["text/plain"]), 708 | ("mk3d", &["video/x-matroska"]), 709 | ("mka", &["audio/x-matroska"]), 710 | ("mkd", &["text/x-markdown"]), 711 | ("mks", &["video/x-matroska"]), 712 | ("mkv", &["video/x-matroska"]), 713 | ("mlp", &["application/vnd.dolby.mlp"]), 714 | ("mmd", &["application/vnd.chipnuts.karaoke-mmd"]), 715 | ("mmf", &["application/x-smaf"]), 716 | ("mml", &["text/mathml"]), 717 | ("mmr", &["image/vnd.fujixerox.edmics-mmr"]), 718 | ("mng", &["video/x-mng"]), 719 | ("mno", &["text/xml"]), 720 | ("mny", &["application/x-msmoney"]), 721 | ("mobi", &["application/x-mobipocket-ebook"]), 722 | ("mod", &["video/mpeg"]), 723 | ("mods", &["application/mods+xml"]), 724 | ("mov", &["video/quicktime"]), 725 | ("movie", &["video/x-sgi-movie"]), 726 | ("mp2", &["audio/mpeg", "video/mpeg"]), 727 | ("mp21", &["application/mp21"]), 728 | ("mp2a", &["audio/mpeg"]), 729 | ("mp2v", &["video/mpeg"]), 730 | ("mp3", &["audio/mpeg"]), 731 | ("mp4", &["video/mp4"]), 732 | ("mp4a", &["audio/mp4"]), 733 | ("mp4s", &["application/mp4"]), 734 | ("mp4v", &["video/mp4"]), 735 | ("mpa", &["video/mpeg"]), 736 | ("mpc", &["application/vnd.mophun.certificate"]), 737 | ("mpd", &["application/dash+xml"]), 738 | ("mpe", &["video/mpeg"]), 739 | ("mpeg", &["video/mpeg"]), 740 | ("mpf", &["application/vnd.ms-mediapackage"]), 741 | ("mpg", &["video/mpeg"]), 742 | ("mpg4", &["video/mp4"]), 743 | ("mpga", &["audio/mpeg"]), 744 | ("mpkg", &["application/vnd.apple.installer+xml"]), 745 | ("mpm", &["application/vnd.blueice.multipass"]), 746 | ("mpn", &["application/vnd.mophun.application"]), 747 | ("mpp", &["application/vnd.ms-project"]), 748 | ("mpt", &["application/vnd.ms-project"]), 749 | ("mpv2", &["video/mpeg"]), 750 | ("mpy", &["application/vnd.ibm.minipay"]), 751 | ("mqv", &["video/quicktime"]), 752 | ("mqy", &["application/vnd.mobius.mqy"]), 753 | ("mrc", &["application/marc"]), 754 | ("mrcx", &["application/marcxml+xml"]), 755 | ("mrw", &["image/x-minolta-mrw"]), 756 | ("ms", &["application/x-troff-ms"]), 757 | ("mscml", &["application/mediaservercontrol+xml"]), 758 | ("mseed", &["application/vnd.fdsn.mseed"]), 759 | ("mseq", &["application/vnd.mseq"]), 760 | ("msf", &["application/vnd.epson.msf"]), 761 | ("msg", &["application/vnd.ms-outlook"]), 762 | ("msh", &["model/mesh"]), 763 | ("msi", &["application/octet-stream"]), 764 | ("msl", &["application/vnd.mobius.msl"]), 765 | ("msm", &["application/octet-stream"]), 766 | ("mso", &["application/octet-stream"]), 767 | ("msp", &["application/octet-stream"]), 768 | ("msty", &["application/vnd.muvee.style"]), 769 | ("mts", &["video/vnd.dlna.mpeg-tts"]), 770 | ("mtx", &["application/xml"]), 771 | ("mus", &["application/vnd.musician"]), 772 | ("musicxml", &["application/vnd.recordare.musicxml+xml"]), 773 | ("mvb", &["application/x-msmediaview"]), 774 | ("mvc", &["application/x-miva-compiled"]), 775 | ("mwf", &["application/vnd.mfer"]), 776 | ("mxf", &["application/mxf"]), 777 | ("mxl", &["application/vnd.recordare.musicxml"]), 778 | ("mxml", &["application/xv+xml"]), 779 | ("mxp", &["application/x-mmxp"]), 780 | ("mxs", &["application/vnd.triscape.mxs"]), 781 | ("mxu", &["video/vnd.mpegurl"]), 782 | ("n-gage", &["application/vnd.nokia.n-gage.symbian.install"]), 783 | ("n3", &["text/n3"]), 784 | ("nb", &["application/mathematica"]), 785 | ("nbp", &["application/vnd.wolfram.player"]), 786 | ("nc", &["application/x-netcdf"]), 787 | ("ncx", &["application/x-dtbncx+xml"]), 788 | ("nef", &["image/x-nikon-nef"]), 789 | ("nfo", &["text/x-nfo"]), 790 | ("ngdat", &["application/vnd.nokia.n-gage.data"]), 791 | ("nitf", &["application/vnd.nitf"]), 792 | ("nlu", &["application/vnd.neurolanguage.nlu"]), 793 | ("nml", &["application/vnd.enliven"]), 794 | ("nnd", &["application/vnd.noblenet-directory"]), 795 | ("nns", &["application/vnd.noblenet-sealer"]), 796 | ("nnw", &["application/vnd.noblenet-web"]), 797 | ("npx", &["image/vnd.net-fpx"]), 798 | ("nq", &["application/n-quads"]), 799 | ("nrw", &["image/x-nikon-nrw"]), 800 | ("nsc", &["video/x-ms-asf"]), 801 | ("nsf", &["application/vnd.lotus-notes"]), 802 | ("nt", &["application/n-triples"]), 803 | ("ntf", &["application/vnd.nitf"]), 804 | ("nws", &["message/rfc822"]), 805 | ("nzb", &["application/x-nzb"]), 806 | ("oa2", &["application/vnd.fujitsu.oasys2"]), 807 | ("oa3", &["application/vnd.fujitsu.oasys3"]), 808 | ("oas", &["application/vnd.fujitsu.oasys"]), 809 | ("obd", &["application/x-msbinder"]), 810 | ("obj", &["application/x-tgif"]), 811 | ("ocx", &["application/octet-stream"]), 812 | ("oda", &["application/oda"]), 813 | ("odb", &["application/vnd.oasis.opendocument.database"]), 814 | ("odc", &["application/vnd.oasis.opendocument.chart"]), 815 | ("odf", &["application/vnd.oasis.opendocument.formula"]), 816 | ( 817 | "odft", 818 | &["application/vnd.oasis.opendocument.formula-template"], 819 | ), 820 | ("odg", &["application/vnd.oasis.opendocument.graphics"]), 821 | ("odh", &["text/plain"]), 822 | ("odi", &["application/vnd.oasis.opendocument.image"]), 823 | ("odl", &["text/plain"]), 824 | ("odm", &["application/vnd.oasis.opendocument.text-master"]), 825 | ("odp", &["application/vnd.oasis.opendocument.presentation"]), 826 | ("ods", &["application/vnd.oasis.opendocument.spreadsheet"]), 827 | ("odt", &["application/vnd.oasis.opendocument.text"]), 828 | ("oga", &["audio/ogg"]), 829 | ("ogg", &["audio/ogg"]), 830 | ("ogv", &["video/ogg"]), 831 | ("ogx", &["application/ogg"]), 832 | ("omdoc", &["application/omdoc+xml"]), 833 | ("one", &["application/onenote"]), 834 | ("onea", &["application/onenote"]), 835 | ("onepkg", &["application/onenote"]), 836 | ("onetmp", &["application/onenote"]), 837 | ("onetoc", &["application/onenote"]), 838 | ("onetoc2", &["application/onenote"]), 839 | ("opf", &["application/oebps-package+xml"]), 840 | ("opml", &["text/x-opml"]), 841 | ("oprc", &["application/vnd.palm"]), 842 | ("opus", &["audio/ogg"]), 843 | ("orderedtest", &["application/xml"]), 844 | ("orf", &["image/x-olympus-orf"]), 845 | ("org", &["application/vnd.lotus-organizer"]), 846 | ("osdx", &["application/opensearchdescription+xml"]), 847 | ("osf", &["application/vnd.yamaha.openscoreformat"]), 848 | ( 849 | "osfpvg", 850 | &["application/vnd.yamaha.openscoreformat.osfpvg+xml"], 851 | ), 852 | ( 853 | "otc", 854 | &["application/vnd.oasis.opendocument.chart-template"], 855 | ), 856 | ("otf", &["application/font-sfnt"]), 857 | ( 858 | "otg", 859 | &["application/vnd.oasis.opendocument.graphics-template"], 860 | ), 861 | ("oth", &["application/vnd.oasis.opendocument.text-web"]), 862 | ( 863 | "oti", 864 | &["application/vnd.oasis.opendocument.image-template"], 865 | ), 866 | ( 867 | "otp", 868 | &["application/vnd.oasis.opendocument.presentation-template"], 869 | ), 870 | ( 871 | "ots", 872 | &["application/vnd.oasis.opendocument.spreadsheet-template"], 873 | ), 874 | ("ott", &["application/vnd.oasis.opendocument.text-template"]), 875 | ("ova", &["application/x-virtualbox-ova"]), 876 | ("ovf", &["application/x-virtualbox-ovf"]), 877 | ("oxps", &["application/oxps"]), 878 | ("oxt", &["application/vnd.openofficeorg.extension"]), 879 | ("p", &["text/x-pascal"]), 880 | ("p10", &["application/pkcs10"]), 881 | ("p12", &["application/x-pkcs12"]), 882 | ("p7b", &["application/x-pkcs7-certificates"]), 883 | ("p7c", &["application/pkcs7-mime"]), 884 | ("p7m", &["application/pkcs7-mime"]), 885 | ("p7r", &["application/x-pkcs7-certreqresp"]), 886 | ("p7s", &["application/pkcs7-signature"]), 887 | ("p8", &["application/pkcs8"]), 888 | ("pac", &["application/x-ns-proxy-autoconfig"]), 889 | ("parquet", &["application/vnd.apache.parquet", "application/x-parquet"]), 890 | ("pas", &["text/x-pascal"]), 891 | ("paw", &["application/vnd.pawaafile"]), 892 | ("pbd", &["application/vnd.powerbuilder6"]), 893 | ("pbm", &["image/x-portable-bitmap"]), 894 | ("pcap", &["application/vnd.tcpdump.pcap"]), 895 | ("pcast", &["application/x-podcast"]), 896 | ("pcf", &["application/x-font-pcf"]), 897 | ("pcl", &["application/vnd.hp-pcl"]), 898 | ("pclxl", &["application/vnd.hp-pclxl"]), 899 | ("pct", &["image/pict"]), 900 | ("pcurl", &["application/vnd.curl.pcurl"]), 901 | ("pcx", &["application/octet-stream"]), 902 | ("pcz", &["application/octet-stream"]), 903 | ("pdb", &["application/vnd.palm"]), 904 | ("pde", &["text/x-processing"]), 905 | ("pdf", &["application/pdf"]), 906 | ("pef", &["image/x-pentax-pef"]), 907 | ("pem", &["application/x-x509-ca-cert"]), 908 | ("pfa", &["application/x-font-type1"]), 909 | ("pfb", &["application/octet-stream"]), 910 | ("pfm", &["application/octet-stream"]), 911 | ("pfr", &["application/font-tdpfr"]), 912 | ("pfx", &["application/x-pkcs12"]), 913 | ("pgm", &["image/x-portable-graymap"]), 914 | ("pgn", &["application/x-chess-pgn"]), 915 | ("pgp", &["application/pgp-encrypted"]), 916 | ("php", &["application/x-httpd-php"]), 917 | ("pic", &["image/pict"]), 918 | ("pict", &["image/pict"]), 919 | ("pkg", &["application/octet-stream"]), 920 | ("pkgdef", &["text/plain"]), 921 | ("pkgundef", &["text/plain"]), 922 | ("pki", &["application/pkixcmp"]), 923 | ("pkipath", &["application/pkix-pkipath"]), 924 | ("pko", &["application/vnd.ms-pki.pko"]), 925 | ("pkpass", &["application/vnd.apple.pkpass"]), 926 | ("pl", &["application/x-perl"]), 927 | ("plb", &["application/vnd.3gpp.pic-bw-large"]), 928 | ("plc", &["application/vnd.mobius.plc"]), 929 | ("plf", &["application/vnd.pocketlearn"]), 930 | ("pls", &["audio/scpls"]), 931 | ("pm", &["application/x-perl"]), 932 | ("pma", &["application/x-perfmon"]), 933 | ("pmc", &["application/x-perfmon"]), 934 | ("pml", &["application/x-perfmon"]), 935 | ("pmr", &["application/x-perfmon"]), 936 | ("pmw", &["application/x-perfmon"]), 937 | ("png", &["image/png"]), 938 | ("pnm", &["image/x-portable-anymap"]), 939 | ("pnt", &["image/x-macpaint"]), 940 | ("pntg", &["image/x-macpaint"]), 941 | ("pnz", &["image/png"]), 942 | ("portpkg", &["application/vnd.macports.portpkg"]), 943 | ("pot", &["application/vnd.ms-powerpoint"]), 944 | ( 945 | "potm", 946 | &["application/vnd.ms-powerpoint.template.macroEnabled.12"], 947 | ), 948 | ( 949 | "potx", 950 | &["application/vnd.openxmlformats-officedocument.presentationml.template"], 951 | ), 952 | ("ppa", &["application/vnd.ms-powerpoint"]), 953 | ( 954 | "ppam", 955 | &["application/vnd.ms-powerpoint.addin.macroEnabled.12"], 956 | ), 957 | ("ppd", &["application/vnd.cups-ppd"]), 958 | ("ppm", &["image/x-portable-pixmap"]), 959 | ("pps", &["application/vnd.ms-powerpoint"]), 960 | ( 961 | "ppsm", 962 | &["application/vnd.ms-powerpoint.slideshow.macroEnabled.12"], 963 | ), 964 | ( 965 | "ppsx", 966 | &["application/vnd.openxmlformats-officedocument.presentationml.slideshow"], 967 | ), 968 | ("ppt", &["application/vnd.ms-powerpoint"]), 969 | ( 970 | "pptm", 971 | &["application/vnd.ms-powerpoint.presentation.macroEnabled.12"], 972 | ), 973 | ( 974 | "pptx", 975 | &["application/vnd.openxmlformats-officedocument.presentationml.presentation"], 976 | ), 977 | ("pqa", &["application/vnd.palm"]), 978 | ("prc", &["application/x-mobipocket-ebook"]), 979 | ("pre", &["application/vnd.lotus-freelance"]), 980 | ("prf", &["application/pics-rules"]), 981 | ("prm", &["application/octet-stream"]), 982 | ("prx", &["application/octet-stream"]), 983 | ("ps", &["application/postscript"]), 984 | ("psb", &["application/vnd.3gpp.pic-bw-small"]), 985 | ("psc1", &["application/PowerShell"]), 986 | ("psd", &["application/octet-stream"]), 987 | ("psess", &["application/xml"]), 988 | ("psf", &["application/x-font-linux-psf"]), 989 | ("pskcxml", &["application/pskc+xml"]), 990 | ("psm", &["application/octet-stream"]), 991 | ("psp", &["application/octet-stream"]), 992 | ("pst", &["application/vnd.ms-outlook"]), 993 | ("ptid", &["application/vnd.pvi.ptid1"]), 994 | ("pub", &["application/x-mspublisher"]), 995 | ("pvb", &["application/vnd.3gpp.pic-bw-var"]), 996 | ("pwn", &["application/vnd.3m.post-it-notes"]), 997 | ("pwz", &["application/vnd.ms-powerpoint"]), 998 | ("py", &["text/plain"]), 999 | ("pya", &["audio/vnd.ms-playready.media.pya"]), 1000 | ("pyv", &["video/vnd.ms-playready.media.pyv"]), 1001 | ("qam", &["application/vnd.epson.quickanime"]), 1002 | ("qbo", &["application/vnd.intu.qbo"]), 1003 | ("qfx", &["application/vnd.intu.qfx"]), 1004 | ("qht", &["text/x-html-insertion"]), 1005 | ("qhtm", &["text/x-html-insertion"]), 1006 | ("qps", &["application/vnd.publishare-delta-tree"]), 1007 | ("qt", &["video/quicktime"]), 1008 | ("qti", &["image/x-quicktime"]), 1009 | ("qtif", &["image/x-quicktime"]), 1010 | ("qtl", &["application/x-quicktimeplayer"]), 1011 | ("qwd", &["application/vnd.quark.quarkxpress"]), 1012 | ("qwt", &["application/vnd.quark.quarkxpress"]), 1013 | ("qxb", &["application/vnd.quark.quarkxpress"]), 1014 | ("qxd", &["application/octet-stream"]), 1015 | ("qxl", &["application/vnd.quark.quarkxpress"]), 1016 | ("qxt", &["application/vnd.quark.quarkxpress"]), 1017 | ("ra", &["audio/x-pn-realaudio"]), 1018 | ("raf", &["image/x-fuji-raf"]), 1019 | ("ram", &["audio/x-pn-realaudio"]), 1020 | ("raml", &["application/raml+yaml"]), 1021 | ("rar", &["application/x-rar-compressed"]), 1022 | ("ras", &["image/x-cmu-raster"]), 1023 | ("rat", &["application/rat-file"]), 1024 | ("raw", &["image/x-panasonic-rw"]), 1025 | ("rc", &["text/plain"]), 1026 | ("rc2", &["text/plain"]), 1027 | ("rcprofile", &["application/vnd.ipunplugged.rcprofile"]), 1028 | ("rct", &["text/plain"]), 1029 | ("rdf", &["application/rdf+xml"]), 1030 | ("rdlc", &["application/xml"]), 1031 | ("rdz", &["application/vnd.data-vision.rdz"]), 1032 | ("reg", &["text/plain"]), 1033 | ("rep", &["application/vnd.businessobjects"]), 1034 | ("res", &["application/x-dtbresource+xml"]), 1035 | ("resx", &["application/xml"]), 1036 | ("rf", &["image/vnd.rn-realflash"]), 1037 | ("rgb", &["image/x-rgb"]), 1038 | ("rgs", &["text/plain"]), 1039 | ("rif", &["application/reginfo+xml"]), 1040 | ("rip", &["audio/vnd.rip"]), 1041 | ("ris", &["application/x-research-info-systems"]), 1042 | ("rl", &["application/resource-lists+xml"]), 1043 | ("rlc", &["image/vnd.fujixerox.edmics-rlc"]), 1044 | ("rld", &["application/resource-lists-diff+xml"]), 1045 | ("rm", &["application/vnd.rn-realmedia"]), 1046 | ("rmi", &["audio/mid"]), 1047 | ("rmp", &["application/vnd.rn-rn_music_package"]), 1048 | ("rms", &["application/vnd.jcp.javame.midlet-rms"]), 1049 | ("rmvb", &["application/vnd.rn-realmedia-vbr"]), 1050 | ("rnc", &["application/relax-ng-compact-syntax"]), 1051 | ("rng", &["application/xml"]), 1052 | ("roa", &["application/rpki-roa"]), 1053 | ("roff", &["application/x-troff"]), 1054 | ("rp9", &["application/vnd.cloanto.rp9"]), 1055 | ("rpm", &["audio/x-pn-realaudio-plugin"]), 1056 | ("rpss", &["application/vnd.nokia.radio-presets"]), 1057 | ("rpst", &["application/vnd.nokia.radio-preset"]), 1058 | ("rq", &["application/sparql-query"]), 1059 | ("rqy", &["text/x-ms-rqy"]), 1060 | ("rs", &["text/x-rust"]), 1061 | ("rsd", &["application/rsd+xml"]), 1062 | ("rss", &["application/rss+xml"]), 1063 | ("rtf", &["application/rtf"]), 1064 | ("rtx", &["text/richtext"]), 1065 | ("ruleset", &["application/xml"]), 1066 | ("run", &["application/x-makeself"]), 1067 | ("rvt", &["application/octet-stream"]), 1068 | ("rw2", &["image/x-panasonic-rw2"]), 1069 | ("rwl", &["image/x-panasonic-rw2"]), 1070 | ("s", &["text/plain"]), 1071 | ("s3m", &["audio/s3m"]), 1072 | ("saf", &["application/vnd.yamaha.smaf-audio"]), 1073 | ("safariextz", &["application/x-safari-safariextz"]), 1074 | ("sass", &["text/x-sass"]), 1075 | ("sbml", &["application/sbml+xml"]), 1076 | ("sc", &["application/vnd.ibm.secure-container"]), 1077 | ("scd", &["application/x-msschedule"]), 1078 | ("scm", &["application/vnd.lotus-screencam"]), 1079 | ("scq", &["application/scvp-cv-request"]), 1080 | ("scr", &["text/plain"]), 1081 | ("scs", &["application/scvp-cv-response"]), 1082 | ("scss", &["text/x-scss"]), 1083 | ("sct", &["text/scriptlet"]), 1084 | ("scurl", &["text/vnd.curl.scurl"]), 1085 | ("sd2", &["audio/x-sd2"]), 1086 | ("sda", &["application/vnd.stardivision.draw"]), 1087 | ("sdc", &["application/vnd.stardivision.calc"]), 1088 | ("sdd", &["application/vnd.stardivision.impress"]), 1089 | ("sdkd", &["application/vnd.solent.sdkm+xml"]), 1090 | ("sdkm", &["application/vnd.solent.sdkm+xml"]), 1091 | ("sdp", &["application/sdp"]), 1092 | ("sdw", &["application/vnd.stardivision.writer"]), 1093 | ("sea", &["application/octet-stream"]), 1094 | ( 1095 | "searchconnector-ms", 1096 | &["application/windows-search-connector+xml"], 1097 | ), 1098 | ("see", &["application/vnd.seemail"]), 1099 | ("seed", &["application/vnd.fdsn.seed"]), 1100 | ("sema", &["application/vnd.sema"]), 1101 | ("semd", &["application/vnd.semd"]), 1102 | ("semf", &["application/vnd.semf"]), 1103 | ("ser", &["application/java-serialized-object"]), 1104 | ("setpay", &["application/set-payment-initiation"]), 1105 | ("setreg", &["application/set-registration-initiation"]), 1106 | ("settings", &["application/xml"]), 1107 | ("sfd-hdstx", &["application/vnd.hydrostatix.sof-data"]), 1108 | ("sfs", &["application/vnd.spotfire.sfs"]), 1109 | ("sfv", &["text/x-sfv"]), 1110 | ("sgi", &["image/sgi"]), 1111 | ("sgimb", &["application/x-sgimb"]), 1112 | ("sgl", &["application/vnd.stardivision.writer-global"]), 1113 | ("sgm", &["text/sgml"]), 1114 | ("sgml", &["text/sgml"]), 1115 | ("sh", &["application/x-sh"]), 1116 | ("shar", &["application/x-shar"]), 1117 | ("shex", &["text/shex"]), 1118 | ("shf", &["application/shf+xml"]), 1119 | ("shtml", &["text/html"]), 1120 | ("sid", &["image/x-mrsid-image"]), 1121 | ("sig", &["application/pgp-signature"]), 1122 | ("sil", &["audio/silk"]), 1123 | ("silo", &["model/mesh"]), 1124 | ("sis", &["application/vnd.symbian.install"]), 1125 | ("sisx", &["application/vnd.symbian.install"]), 1126 | ("sit", &["application/x-stuffit"]), 1127 | ("sitemap", &["application/xml"]), 1128 | ("sitx", &["application/x-stuffitx"]), 1129 | ("skd", &["application/vnd.koan"]), 1130 | ("skin", &["application/xml"]), 1131 | ("skm", &["application/vnd.koan"]), 1132 | ("skp", &["application/x-koan"]), 1133 | ("skt", &["application/vnd.koan"]), 1134 | ( 1135 | "sldm", 1136 | &["application/vnd.ms-powerpoint.slide.macroEnabled.12"], 1137 | ), 1138 | ( 1139 | "sldx", 1140 | &["application/vnd.openxmlformats-officedocument.presentationml.slide"], 1141 | ), 1142 | ("slim", &["text/slim"]), 1143 | ("slk", &["application/vnd.ms-excel"]), 1144 | ("slm", &["text/slim"]), 1145 | ("sln", &["text/plain"]), 1146 | ("slt", &["application/vnd.epson.salt"]), 1147 | ("slupkg-ms", &["application/x-ms-license"]), 1148 | ("sm", &["application/vnd.stepmania.stepchart"]), 1149 | ("smd", &["audio/x-smd"]), 1150 | ("smf", &["application/vnd.stardivision.math"]), 1151 | ("smi", &["application/octet-stream"]), 1152 | ("smil", &["application/smil+xml"]), 1153 | ("smv", &["video/x-smv"]), 1154 | ("smx", &["audio/x-smd"]), 1155 | ("smz", &["audio/x-smd"]), 1156 | ("smzip", &["application/vnd.stepmania.package"]), 1157 | ("snd", &["audio/basic"]), 1158 | ("snf", &["application/x-font-snf"]), 1159 | ("snippet", &["application/xml"]), 1160 | ("snp", &["application/octet-stream"]), 1161 | ("so", &["application/octet-stream"]), 1162 | ("sol", &["text/plain"]), 1163 | ("sor", &["text/plain"]), 1164 | ("spc", &["application/x-pkcs7-certificates"]), 1165 | ("spf", &["application/vnd.yamaha.smaf-phrase"]), 1166 | ("spl", &["application/futuresplash"]), 1167 | ("spot", &["text/vnd.in3d.spot"]), 1168 | ("spp", &["application/scvp-vp-response"]), 1169 | ("spq", &["application/scvp-vp-request"]), 1170 | ("spx", &["audio/ogg"]), 1171 | ("sql", &["application/x-sql"]), 1172 | ("sr2", &["image/x-sony-sr2"]), 1173 | ("src", &["application/x-wais-source"]), 1174 | ("srf", &[ 1175 | "text/plain", 1176 | "image/x-sony-srf" 1177 | ]), 1178 | ("srt", &["application/x-subrip"]), 1179 | ("sru", &["application/sru+xml"]), 1180 | ("srx", &["application/sparql-results+xml"]), 1181 | ("ssdl", &["application/ssdl+xml"]), 1182 | ("sse", &["application/vnd.kodak-descriptor"]), 1183 | ("ssf", &["application/vnd.epson.ssf"]), 1184 | ("ssisdeploymentmanifest", &["text/xml"]), 1185 | ("ssm", &["application/streamingmedia"]), 1186 | ("ssml", &["application/ssml+xml"]), 1187 | ("sst", &["application/vnd.ms-pki.certstore"]), 1188 | ("st", &["application/vnd.sailingtracker.track"]), 1189 | ("stc", &["application/vnd.sun.xml.calc.template"]), 1190 | ("std", &["application/vnd.sun.xml.draw.template"]), 1191 | ("step", &["application/step"]), 1192 | ("stf", &["application/vnd.wt.stf"]), 1193 | ("sti", &["application/vnd.sun.xml.impress.template"]), 1194 | ("stk", &["application/hyperstudio"]), 1195 | ("stl", &["application/vnd.ms-pki.stl"]), 1196 | ("stp", &["application/step"]), 1197 | ("str", &["application/vnd.pg.format"]), 1198 | ("stw", &["application/vnd.sun.xml.writer.template"]), 1199 | ("styl", &["text/stylus"]), 1200 | ("stylus", &["text/stylus"]), 1201 | ("sub", &["text/vnd.dvb.subtitle"]), 1202 | ("sus", &["application/vnd.sus-calendar"]), 1203 | ("susp", &["application/vnd.sus-calendar"]), 1204 | ("sv4cpio", &["application/x-sv4cpio"]), 1205 | ("sv4crc", &["application/x-sv4crc"]), 1206 | ("svc", &["application/xml"]), 1207 | ("svd", &["application/vnd.svd"]), 1208 | ("svg", &["image/svg+xml"]), 1209 | ("svgz", &["image/svg+xml"]), 1210 | ("swa", &["application/x-director"]), 1211 | ("swf", &["application/x-shockwave-flash"]), 1212 | ("swi", &["application/vnd.aristanetworks.swi"]), 1213 | ("sxc", &["application/vnd.sun.xml.calc"]), 1214 | ("sxd", &["application/vnd.sun.xml.draw"]), 1215 | ("sxg", &["application/vnd.sun.xml.writer.global"]), 1216 | ("sxi", &["application/vnd.sun.xml.impress"]), 1217 | ("sxm", &["application/vnd.sun.xml.math"]), 1218 | ("sxw", &["application/vnd.sun.xml.writer"]), 1219 | ("t", &["application/x-troff"]), 1220 | ("t3", &["application/x-t3vm-image"]), 1221 | ("taglet", &["application/vnd.mynfc"]), 1222 | ("tao", &["application/vnd.tao.intent-module-archive"]), 1223 | ("tar", &["application/x-tar"]), 1224 | ("tcap", &["application/vnd.3gpp2.tcap"]), 1225 | ("tcl", &["application/x-tcl"]), 1226 | ("teacher", &["application/vnd.smart.teacher"]), 1227 | ("tei", &["application/tei+xml"]), 1228 | ("teicorpus", &["application/tei+xml"]), 1229 | ("testrunconfig", &["application/xml"]), 1230 | ("testsettings", &["application/xml"]), 1231 | ("tex", &["application/x-tex"]), 1232 | ("texi", &["application/x-texinfo"]), 1233 | ("texinfo", &["application/x-texinfo"]), 1234 | ("text", &["text/plain"]), 1235 | ("tfi", &["application/thraud+xml"]), 1236 | ("tfm", &["application/x-tex-tfm"]), 1237 | ("tga", &["image/x-tga"]), 1238 | ("tgz", &["application/x-compressed"]), 1239 | ("thmx", &["application/vnd.ms-officetheme"]), 1240 | ("thn", &["application/octet-stream"]), 1241 | ("tif", &["image/tiff"]), 1242 | ("tiff", &["image/tiff"]), 1243 | ("tk", &["application/x-tcl"]), 1244 | ("tlh", &["text/plain"]), 1245 | ("tli", &["text/plain"]), 1246 | ("tmo", &["application/vnd.tmobile-livetv"]), 1247 | ("toc", &["application/octet-stream"]), 1248 | ("toml", &["text/x-toml"]), 1249 | ("torrent", &["application/x-bittorrent"]), 1250 | ("tpl", &["application/vnd.groove-tool-template"]), 1251 | ("tpt", &["application/vnd.trid.tpt"]), 1252 | ("tr", &["application/x-troff"]), 1253 | ("tra", &["application/vnd.trueapp"]), 1254 | ("trig", &["application/trig"]), 1255 | ("trm", &["application/x-msterminal"]), 1256 | ("trx", &["application/xml"]), 1257 | ("ts", &["video/vnd.dlna.mpeg-tts"]), 1258 | ("tsd", &["application/timestamped-data"]), 1259 | ("tsv", &["text/tab-separated-values"]), 1260 | ("ttc", &["font/collection"]), 1261 | ("ttf", &["font/ttf", "application/x-font-ttf", "application/font-sfnt"]), 1262 | ("ttl", &["text/turtle"]), 1263 | ("tts", &["video/vnd.dlna.mpeg-tts"]), 1264 | ("twd", &["application/vnd.simtech-mindmapper"]), 1265 | ("twds", &["application/vnd.simtech-mindmapper"]), 1266 | ("txd", &["application/vnd.genomatix.tuxedo"]), 1267 | ("txf", &["application/vnd.mobius.txf"]), 1268 | ("txt", &["text/plain"]), 1269 | ("u32", &["application/octet-stream"]), 1270 | ("u8dsn", &["message/global-delivery-status"]), 1271 | ("u8hdr", &["message/global-headers"]), 1272 | ("u8mdn", &["message/global-disposition-notification"]), 1273 | ("u8msg", &["message/global"]), 1274 | ("udeb", &["application/x-debian-package"]), 1275 | ("ufd", &["application/vnd.ufdl"]), 1276 | ("ufdl", &["application/vnd.ufdl"]), 1277 | ("uls", &["text/iuls"]), 1278 | ("ulx", &["application/x-glulx"]), 1279 | ("umj", &["application/vnd.umajin"]), 1280 | ("unityweb", &["application/vnd.unity"]), 1281 | ("uoml", &["application/vnd.uoml+xml"]), 1282 | ("uri", &["text/uri-list"]), 1283 | ("uris", &["text/uri-list"]), 1284 | ("urls", &["text/uri-list"]), 1285 | ("user", &["text/plain"]), 1286 | ("ustar", &["application/x-ustar"]), 1287 | ("utz", &["application/vnd.uiq.theme"]), 1288 | ("uu", &["text/x-uuencode"]), 1289 | ("uva", &["audio/vnd.dece.audio"]), 1290 | ("uvd", &["application/vnd.dece.data"]), 1291 | ("uvf", &["application/vnd.dece.data"]), 1292 | ("uvg", &["image/vnd.dece.graphic"]), 1293 | ("uvh", &["video/vnd.dece.hd"]), 1294 | ("uvi", &["image/vnd.dece.graphic"]), 1295 | ("uvm", &["video/vnd.dece.mobile"]), 1296 | ("uvp", &["video/vnd.dece.pd"]), 1297 | ("uvs", &["video/vnd.dece.sd"]), 1298 | ("uvt", &["application/vnd.dece.ttml+xml"]), 1299 | ("uvu", &["video/vnd.uvvu.mp4"]), 1300 | ("uvv", &["video/vnd.dece.video"]), 1301 | ("uvva", &["audio/vnd.dece.audio"]), 1302 | ("uvvd", &["application/vnd.dece.data"]), 1303 | ("uvvf", &["application/vnd.dece.data"]), 1304 | ("uvvg", &["image/vnd.dece.graphic"]), 1305 | ("uvvh", &["video/vnd.dece.hd"]), 1306 | ("uvvi", &["image/vnd.dece.graphic"]), 1307 | ("uvvm", &["video/vnd.dece.mobile"]), 1308 | ("uvvp", &["video/vnd.dece.pd"]), 1309 | ("uvvs", &["video/vnd.dece.sd"]), 1310 | ("uvvt", &["application/vnd.dece.ttml+xml"]), 1311 | ("uvvu", &["video/vnd.uvvu.mp4"]), 1312 | ("uvvv", &["video/vnd.dece.video"]), 1313 | ("uvvx", &["application/vnd.dece.unspecified"]), 1314 | ("uvvz", &["application/vnd.dece.zip"]), 1315 | ("uvx", &["application/vnd.dece.unspecified"]), 1316 | ("uvz", &["application/vnd.dece.zip"]), 1317 | ("vb", &["text/plain"]), 1318 | ("vbdproj", &["text/plain"]), 1319 | ("vbk", &["video/mpeg"]), 1320 | ("vbox", &["application/x-virtualbox-vbox"]), 1321 | ("vbox-extpack", &["application/x-virtualbox-vbox-extpack"]), 1322 | ("vbproj", &["text/plain"]), 1323 | ("vbs", &["text/vbscript"]), 1324 | ("vcard", &["text/vcard"]), 1325 | ("vcd", &["application/x-cdlink"]), 1326 | ("vcf", &["text/x-vcard"]), 1327 | ("vcg", &["application/vnd.groove-vcard"]), 1328 | ("vcproj", &["application/xml"]), 1329 | ("vcs", &["text/plain"]), 1330 | ("vcx", &["application/vnd.vcx"]), 1331 | ("vcxproj", &["application/xml"]), 1332 | ("vddproj", &["text/plain"]), 1333 | ("vdi", &["application/x-virtualbox-vdi"]), 1334 | ("vdp", &["text/plain"]), 1335 | ("vdproj", &["text/plain"]), 1336 | ("vdx", &["application/vnd.ms-visio.viewer"]), 1337 | ("vhd", &["application/x-virtualbox-vhd"]), 1338 | ("vis", &["application/vnd.visionary"]), 1339 | ("viv", &["video/vnd.vivo"]), 1340 | ("vmdk", &["application/x-virtualbox-vmdk"]), 1341 | ("vml", &["text/xml"]), 1342 | ("vob", &["video/x-ms-vob"]), 1343 | ("vor", &["application/vnd.stardivision.writer"]), 1344 | ("vox", &["application/x-authorware-bin"]), 1345 | ("vrml", &["model/vrml"]), 1346 | ("vscontent", &["application/xml"]), 1347 | ("vsct", &["text/xml"]), 1348 | ("vsd", &["application/vnd.visio"]), 1349 | ("vsf", &["application/vnd.vsf"]), 1350 | ("vsi", &["application/ms-vsi"]), 1351 | ("vsix", &["application/vsix"]), 1352 | ("vsixlangpack", &["text/xml"]), 1353 | ("vsixmanifest", &["text/xml"]), 1354 | ("vsmdi", &["application/xml"]), 1355 | ("vspscc", &["text/plain"]), 1356 | ("vss", &["application/vnd.visio"]), 1357 | ("vsscc", &["text/plain"]), 1358 | ("vssettings", &["text/xml"]), 1359 | ("vssscc", &["text/plain"]), 1360 | ("vst", &["application/vnd.visio"]), 1361 | ("vstemplate", &["text/xml"]), 1362 | ("vsto", &["application/x-ms-vsto"]), 1363 | ("vsw", &["application/vnd.visio"]), 1364 | ("vsx", &["application/vnd.visio"]), 1365 | ("vtt", &["text/vtt"]), 1366 | ("vtu", &["model/vnd.vtu"]), 1367 | ("vtx", &["application/vnd.visio"]), 1368 | ("vxml", &["application/voicexml+xml"]), 1369 | ("w3d", &["application/x-director"]), 1370 | ("wad", &["application/x-doom"]), 1371 | ("wadl", &["application/vnd.sun.wadl+xml"]), 1372 | ("war", &["application/java-archive"]), 1373 | ("wasm", &["application/wasm"]), 1374 | ("wav", &["audio/wav"]), 1375 | ("wave", &["audio/wav"]), 1376 | ("wax", &["audio/x-ms-wax"]), 1377 | ("wbk", &["application/msword"]), 1378 | ("wbmp", &["image/vnd.wap.wbmp"]), 1379 | ("wbs", &["application/vnd.criticaltools.wbs+xml"]), 1380 | ("wbxml", &["application/vnd.wap.wbxml"]), 1381 | ("wcm", &["application/vnd.ms-works"]), 1382 | ("wdb", &["application/vnd.ms-works"]), 1383 | ("wdp", &["image/vnd.ms-photo"]), 1384 | ("weba", &["audio/webm"]), 1385 | ("webapp", &["application/x-web-app-manifest+json"]), 1386 | ("webarchive", &["application/x-safari-webarchive"]), 1387 | ("webm", &["video/webm"]), 1388 | ("webmanifest", &["application/manifest+json"]), 1389 | ("webp", &["image/webp"]), 1390 | ("webtest", &["application/xml"]), 1391 | ("wg", &["application/vnd.pmi.widget"]), 1392 | ("wgt", &["application/widget"]), 1393 | ("wiq", &["application/xml"]), 1394 | ("wiz", &["application/msword"]), 1395 | ("wks", &["application/vnd.ms-works"]), 1396 | ("wlmp", &["application/wlmoviemaker"]), 1397 | ("wlpginstall", &["application/x-wlpg-detect"]), 1398 | ("wlpginstall3", &["application/x-wlpg3-detect"]), 1399 | ("wm", &["video/x-ms-wm"]), 1400 | ("wma", &["audio/x-ms-wma"]), 1401 | ("wmd", &["application/x-ms-wmd"]), 1402 | ("wmf", &["application/x-msmetafile"]), 1403 | ("wml", &["text/vnd.wap.wml"]), 1404 | ("wmlc", &["application/vnd.wap.wmlc"]), 1405 | ("wmls", &["text/vnd.wap.wmlscript"]), 1406 | ("wmlsc", &["application/vnd.wap.wmlscriptc"]), 1407 | ("wmp", &["video/x-ms-wmp"]), 1408 | ("wmv", &["video/x-ms-wmv"]), 1409 | ("wmx", &["video/x-ms-wmx"]), 1410 | ("wmz", &["application/x-ms-wmz"]), 1411 | ("woff", &["font/woff", "application/font-woff"]), 1412 | ("woff2", &["font/woff2"]), 1413 | ("wpd", &["application/vnd.wordperfect"]), 1414 | ("wpl", &["application/vnd.ms-wpl"]), 1415 | ("wps", &["application/vnd.ms-works"]), 1416 | ("wqd", &["application/vnd.wqd"]), 1417 | ("wri", &["application/x-mswrite"]), 1418 | ("wrl", &["x-world/x-vrml"]), 1419 | ("wrz", &["x-world/x-vrml"]), 1420 | ("wsc", &["text/scriptlet"]), 1421 | ("wsdl", &["text/xml"]), 1422 | ("wspolicy", &["application/wspolicy+xml"]), 1423 | ("wtb", &["application/vnd.webturbo"]), 1424 | ("wvx", &["video/x-ms-wvx"]), 1425 | ("x", &["application/directx"]), 1426 | ("x32", &["application/x-authorware-bin"]), 1427 | ("x3d", &["model/x3d+xml"]), 1428 | ("x3db", &["model/x3d+binary"]), 1429 | ("x3dbz", &["model/x3d+binary"]), 1430 | ("x3dv", &["model/x3d+vrml"]), 1431 | ("x3dvz", &["model/x3d+vrml"]), 1432 | ("x3dz", &["model/x3d+xml"]), 1433 | ("x3f", &["image/x-sigma-x3f"]), 1434 | ("xaf", &["x-world/x-vrml"]), 1435 | ("xaml", &["application/xaml+xml"]), 1436 | ("xap", &["application/x-silverlight-app"]), 1437 | ("xar", &["application/vnd.xara"]), 1438 | ("xbap", &["application/x-ms-xbap"]), 1439 | ("xbd", &["application/vnd.fujixerox.docuworks.binder"]), 1440 | ("xbm", &["image/x-xbitmap"]), 1441 | ("xcf", &["image/x-xcf"]), 1442 | ("xdf", &["application/xcap-diff+xml"]), 1443 | ("xdm", &["application/vnd.syncml.dm+xml"]), 1444 | ("xdp", &["application/vnd.adobe.xdp+xml"]), 1445 | ("xdr", &["text/plain"]), 1446 | ("xdssc", &["application/dssc+xml"]), 1447 | ("xdw", &["application/vnd.fujixerox.docuworks"]), 1448 | ("xenc", &["application/xenc+xml"]), 1449 | ("xer", &["application/patch-ops-error+xml"]), 1450 | ("xfdf", &["application/vnd.adobe.xfdf"]), 1451 | ("xfdl", &["application/vnd.xfdl"]), 1452 | ("xht", &["application/xhtml+xml"]), 1453 | ("xhtml", &["application/xhtml+xml"]), 1454 | ("xhvml", &["application/xv+xml"]), 1455 | ("xif", &["image/vnd.xiff"]), 1456 | ("xla", &["application/vnd.ms-excel"]), 1457 | ("xlam", &["application/vnd.ms-excel.addin.macroEnabled.12"]), 1458 | ("xlc", &["application/vnd.ms-excel"]), 1459 | ("xld", &["application/vnd.ms-excel"]), 1460 | ("xlf", &["application/x-xliff+xml"]), 1461 | ("xlk", &["application/vnd.ms-excel"]), 1462 | ("xll", &["application/vnd.ms-excel"]), 1463 | ("xlm", &["application/vnd.ms-excel"]), 1464 | ("xls", &["application/vnd.ms-excel"]), 1465 | ( 1466 | "xlsb", 1467 | &["application/vnd.ms-excel.sheet.binary.macroEnabled.12"], 1468 | ), 1469 | ("xlsm", &["application/vnd.ms-excel.sheet.macroEnabled.12"]), 1470 | ( 1471 | "xlsx", 1472 | &["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"], 1473 | ), 1474 | ("xlt", &["application/vnd.ms-excel"]), 1475 | ( 1476 | "xltm", 1477 | &["application/vnd.ms-excel.template.macroEnabled.12"], 1478 | ), 1479 | ( 1480 | "xltx", 1481 | &["application/vnd.openxmlformats-officedocument.spreadsheetml.template"], 1482 | ), 1483 | ("xlw", &["application/vnd.ms-excel"]), 1484 | ("xm", &["audio/xm"]), 1485 | ("xml", &["text/xml"]), 1486 | ("xmp", &["application/octet-stream"]), 1487 | ("xmta", &["application/xml"]), 1488 | ("xo", &["application/vnd.olpc-sugar"]), 1489 | ("xof", &["x-world/x-vrml"]), 1490 | ("xoml", &["text/plain"]), 1491 | ("xop", &["application/xop+xml"]), 1492 | ("xpi", &["application/x-xpinstall"]), 1493 | ("xpl", &["application/xproc+xml"]), 1494 | ("xpm", &["image/x-xpixmap"]), 1495 | ("xpr", &["application/vnd.is-xpr"]), 1496 | ("xps", &["application/vnd.ms-xpsdocument"]), 1497 | ("xpw", &["application/vnd.intercon.formnet"]), 1498 | ("xpx", &["application/vnd.intercon.formnet"]), 1499 | ("xrm-ms", &["text/xml"]), 1500 | ("xsc", &["application/xml"]), 1501 | ("xsd", &["text/xml"]), 1502 | ("xsf", &["text/xml"]), 1503 | ("xsl", &["text/xml"]), 1504 | ("xslt", &["text/xml"]), 1505 | ("xsm", &["application/vnd.syncml+xml"]), 1506 | ("xsn", &["application/octet-stream"]), 1507 | ("xspf", &["application/xspf+xml"]), 1508 | ("xss", &["application/xml"]), 1509 | ("xtp", &["application/octet-stream"]), 1510 | ("xul", &["application/vnd.mozilla.xul+xml"]), 1511 | ("xvm", &["application/xv+xml"]), 1512 | ("xvml", &["application/xv+xml"]), 1513 | ("xwd", &["image/x-xwindowdump"]), 1514 | ("xyz", &["chemical/x-xyz"]), 1515 | ("xz", &["application/x-xz"]), 1516 | ("yaml", &["text/x-yaml"]), 1517 | ("yang", &["application/yang"]), 1518 | ("yin", &["application/yin+xml"]), 1519 | ("yml", &["text/x-yaml"]), 1520 | ("ymp", &["text/x-suse-ymp"]), 1521 | ("z", &["application/x-compress"]), 1522 | ("z1", &["application/x-zmachine"]), 1523 | ("z2", &["application/x-zmachine"]), 1524 | ("z3", &["application/x-zmachine"]), 1525 | ("z4", &["application/x-zmachine"]), 1526 | ("z5", &["application/x-zmachine"]), 1527 | ("z6", &["application/x-zmachine"]), 1528 | ("z7", &["application/x-zmachine"]), 1529 | ("z8", &["application/x-zmachine"]), 1530 | ("zaz", &["application/vnd.zzazz.deck+xml"]), 1531 | ("zip", &["application/zip"]), 1532 | ("zir", &["application/vnd.zul"]), 1533 | ("zirz", &["application/vnd.zul"]), 1534 | ("zmm", &["application/vnd.handheld-entertainment+xml"]), 1535 | ]; 1536 | --------------------------------------------------------------------------------