source: binary-improvements/MapRendering/Web/MimeType.cs@ 300

Last change on this file since 300 was 230, checked in by alloc, 10 years ago

Binary improvements

File size: 23.6 KB
Line 
1using System;
2using System.Collections.Generic;
3
4namespace AllocsFixes.NetConnections.Servers.Web
5{
6 public class MimeType
7 {
8 private static IDictionary<string, string> _mappings = new Dictionary<string, string> (StringComparer.InvariantCultureIgnoreCase) {
9 {".323", "text/h323"},
10 {".3g2", "video/3gpp2"},
11 {".3gp", "video/3gpp"},
12 {".3gp2", "video/3gpp2"},
13 {".3gpp", "video/3gpp"},
14 {".7z", "application/x-7z-compressed"},
15 {".aa", "audio/audible"},
16 {".AAC", "audio/aac"},
17 {".aaf", "application/octet-stream"},
18 {".aax", "audio/vnd.audible.aax"},
19 {".ac3", "audio/ac3"},
20 {".aca", "application/octet-stream"},
21 {".accda", "application/msaccess.addin"},
22 {".accdb", "application/msaccess"},
23 {".accdc", "application/msaccess.cab"},
24 {".accde", "application/msaccess"},
25 {".accdr", "application/msaccess.runtime"},
26 {".accdt", "application/msaccess"},
27 {".accdw", "application/msaccess.webapplication"},
28 {".accft", "application/msaccess.ftemplate"},
29 {".acx", "application/internet-property-stream"},
30 {".AddIn", "text/xml"},
31 {".ade", "application/msaccess"},
32 {".adobebridge", "application/x-bridge-url"},
33 {".adp", "application/msaccess"},
34 {".ADT", "audio/vnd.dlna.adts"},
35 {".ADTS", "audio/aac"},
36 {".afm", "application/octet-stream"},
37 {".ai", "application/postscript"},
38 {".aif", "audio/x-aiff"},
39 {".aifc", "audio/aiff"},
40 {".aiff", "audio/aiff"},
41 {".air", "application/vnd.adobe.air-application-installer-package+zip"},
42 {".amc", "application/x-mpeg"},
43 {".application", "application/x-ms-application"},
44 {".art", "image/x-jg"},
45 {".asa", "application/xml"},
46 {".asax", "application/xml"},
47 {".ascx", "application/xml"},
48 {".asd", "application/octet-stream"},
49 {".asf", "video/x-ms-asf"},
50 {".ashx", "application/xml"},
51 {".asi", "application/octet-stream"},
52 {".asm", "text/plain"},
53 {".asmx", "application/xml"},
54 {".aspx", "application/xml"},
55 {".asr", "video/x-ms-asf"},
56 {".asx", "video/x-ms-asf"},
57 {".atom", "application/atom+xml"},
58 {".au", "audio/basic"},
59 {".avi", "video/x-msvideo"},
60 {".axs", "application/olescript"},
61 {".bas", "text/plain"},
62 {".bcpio", "application/x-bcpio"},
63 {".bin", "application/octet-stream"},
64 {".bmp", "image/bmp"},
65 {".c", "text/plain"},
66 {".cab", "application/octet-stream"},
67 {".caf", "audio/x-caf"},
68 {".calx", "application/vnd.ms-office.calx"},
69 {".cat", "application/vnd.ms-pki.seccat"},
70 {".cc", "text/plain"},
71 {".cd", "text/plain"},
72 {".cdda", "audio/aiff"},
73 {".cdf", "application/x-cdf"},
74 {".cer", "application/x-x509-ca-cert"},
75 {".chm", "application/octet-stream"},
76 {".class", "application/x-java-applet"},
77 {".clp", "application/x-msclip"},
78 {".cmx", "image/x-cmx"},
79 {".cnf", "text/plain"},
80 {".cod", "image/cis-cod"},
81 {".config", "application/xml"},
82 {".contact", "text/x-ms-contact"},
83 {".coverage", "application/xml"},
84 {".cpio", "application/x-cpio"},
85 {".cpp", "text/plain"},
86 {".crd", "application/x-mscardfile"},
87 {".crl", "application/pkix-crl"},
88 {".crt", "application/x-x509-ca-cert"},
89 {".cs", "text/plain"},
90 {".csdproj", "text/plain"},
91 {".csh", "application/x-csh"},
92 {".csproj", "text/plain"},
93 {".css", "text/css"},
94 {".csv", "text/csv"},
95 {".cur", "application/octet-stream"},
96 {".cxx", "text/plain"},
97 {".dat", "application/octet-stream"},
98 {".datasource", "application/xml"},
99 {".dbproj", "text/plain"},
100 {".dcr", "application/x-director"},
101 {".def", "text/plain"},
102 {".deploy", "application/octet-stream"},
103 {".der", "application/x-x509-ca-cert"},
104 {".dgml", "application/xml"},
105 {".dib", "image/bmp"},
106 {".dif", "video/x-dv"},
107 {".dir", "application/x-director"},
108 {".disco", "text/xml"},
109 {".dll", "application/x-msdownload"},
110 {".dll.config", "text/xml"},
111 {".dlm", "text/dlm"},
112 {".doc", "application/msword"},
113 {".docm", "application/vnd.ms-word.document.macroEnabled.12"},
114 {".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
115 {".dot", "application/msword"},
116 {".dotm", "application/vnd.ms-word.template.macroEnabled.12"},
117 {".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"},
118 {".dsp", "application/octet-stream"},
119 {".dsw", "text/plain"},
120 {".dtd", "text/xml"},
121 {".dtsConfig", "text/xml"},
122 {".dv", "video/x-dv"},
123 {".dvi", "application/x-dvi"},
124 {".dwf", "drawing/x-dwf"},
125 {".dwp", "application/octet-stream"},
126 {".dxr", "application/x-director"},
127 {".eml", "message/rfc822"},
128 {".emz", "application/octet-stream"},
129 {".eot", "application/octet-stream"},
130 {".eps", "application/postscript"},
131 {".etl", "application/etl"},
132 {".etx", "text/x-setext"},
133 {".evy", "application/envoy"},
134 {".exe", "application/octet-stream"},
135 {".exe.config", "text/xml"},
136 {".fdf", "application/vnd.fdf"},
137 {".fif", "application/fractals"},
138 {".filters", "Application/xml"},
139 {".fla", "application/octet-stream"},
140 {".flr", "x-world/x-vrml"},
141 {".flv", "video/x-flv"},
142 {".fsscript", "application/fsharp-script"},
143 {".fsx", "application/fsharp-script"},
144 {".generictest", "application/xml"},
145 {".gif", "image/gif"},
146 {".group", "text/x-ms-group"},
147 {".gsm", "audio/x-gsm"},
148 {".gtar", "application/x-gtar"},
149 {".gz", "application/x-gzip"},
150 {".h", "text/plain"},
151 {".hdf", "application/x-hdf"},
152 {".hdml", "text/x-hdml"},
153 {".hhc", "application/x-oleobject"},
154 {".hhk", "application/octet-stream"},
155 {".hhp", "application/octet-stream"},
156 {".hlp", "application/winhlp"},
157 {".hpp", "text/plain"},
158 {".hqx", "application/mac-binhex40"},
159 {".hta", "application/hta"},
160 {".htc", "text/x-component"},
161 {".htm", "text/html"},
162 {".html", "text/html"},
163 {".htt", "text/webviewhtml"},
164 {".hxa", "application/xml"},
165 {".hxc", "application/xml"},
166 {".hxd", "application/octet-stream"},
167 {".hxe", "application/xml"},
168 {".hxf", "application/xml"},
169 {".hxh", "application/octet-stream"},
170 {".hxi", "application/octet-stream"},
171 {".hxk", "application/xml"},
172 {".hxq", "application/octet-stream"},
173 {".hxr", "application/octet-stream"},
174 {".hxs", "application/octet-stream"},
175 {".hxt", "text/html"},
176 {".hxv", "application/xml"},
177 {".hxw", "application/octet-stream"},
178 {".hxx", "text/plain"},
179 {".i", "text/plain"},
180 {".ico", "image/x-icon"},
181 {".ics", "application/octet-stream"},
182 {".idl", "text/plain"},
183 {".ief", "image/ief"},
184 {".iii", "application/x-iphone"},
185 {".inc", "text/plain"},
186 {".inf", "application/octet-stream"},
187 {".inl", "text/plain"},
188 {".ins", "application/x-internet-signup"},
189 {".ipa", "application/x-itunes-ipa"},
190 {".ipg", "application/x-itunes-ipg"},
191 {".ipproj", "text/plain"},
192 {".ipsw", "application/x-itunes-ipsw"},
193 {".iqy", "text/x-ms-iqy"},
194 {".isp", "application/x-internet-signup"},
195 {".ite", "application/x-itunes-ite"},
196 {".itlp", "application/x-itunes-itlp"},
197 {".itms", "application/x-itunes-itms"},
198 {".itpc", "application/x-itunes-itpc"},
199 {".IVF", "video/x-ivf"},
200 {".jar", "application/java-archive"},
201 {".java", "application/octet-stream"},
202 {".jck", "application/liquidmotion"},
203 {".jcz", "application/liquidmotion"},
204 {".jfif", "image/pjpeg"},
205 {".jnlp", "application/x-java-jnlp-file"},
206 {".jpb", "application/octet-stream"},
207 {".jpe", "image/jpeg"},
208 {".jpeg", "image/jpeg"},
209 {".jpg", "image/jpeg"},
210 {".js", "application/x-javascript"},
211 {".json", "application/json"},
212 {".jsx", "text/jscript"},
213 {".jsxbin", "text/plain"},
214 {".latex", "application/x-latex"},
215 {".library-ms", "application/windows-library+xml"},
216 {".lit", "application/x-ms-reader"},
217 {".loadtest", "application/xml"},
218 {".lpk", "application/octet-stream"},
219 {".lsf", "video/x-la-asf"},
220 {".lst", "text/plain"},
221 {".lsx", "video/x-la-asf"},
222 {".lzh", "application/octet-stream"},
223 {".m13", "application/x-msmediaview"},
224 {".m14", "application/x-msmediaview"},
225 {".m1v", "video/mpeg"},
226 {".m2t", "video/vnd.dlna.mpeg-tts"},
227 {".m2ts", "video/vnd.dlna.mpeg-tts"},
228 {".m2v", "video/mpeg"},
229 {".m3u", "audio/x-mpegurl"},
230 {".m3u8", "audio/x-mpegurl"},
231 {".m4a", "audio/m4a"},
232 {".m4b", "audio/m4b"},
233 {".m4p", "audio/m4p"},
234 {".m4r", "audio/x-m4r"},
235 {".m4v", "video/x-m4v"},
236 {".mac", "image/x-macpaint"},
237 {".mak", "text/plain"},
238 {".man", "application/x-troff-man"},
239 {".manifest", "application/x-ms-manifest"},
240 {".map", "text/plain"},
241 {".master", "application/xml"},
242 {".mda", "application/msaccess"},
243 {".mdb", "application/x-msaccess"},
244 {".mde", "application/msaccess"},
245 {".mdp", "application/octet-stream"},
246 {".me", "application/x-troff-me"},
247 {".mfp", "application/x-shockwave-flash"},
248 {".mht", "message/rfc822"},
249 {".mhtml", "message/rfc822"},
250 {".mid", "audio/mid"},
251 {".midi", "audio/mid"},
252 {".mix", "application/octet-stream"},
253 {".mk", "text/plain"},
254 {".mmf", "application/x-smaf"},
255 {".mno", "text/xml"},
256 {".mny", "application/x-msmoney"},
257 {".mod", "video/mpeg"},
258 {".mov", "video/quicktime"},
259 {".movie", "video/x-sgi-movie"},
260 {".mp2", "video/mpeg"},
261 {".mp2v", "video/mpeg"},
262 {".mp3", "audio/mpeg"},
263 {".mp4", "video/mp4"},
264 {".mp4v", "video/mp4"},
265 {".mpa", "video/mpeg"},
266 {".mpe", "video/mpeg"},
267 {".mpeg", "video/mpeg"},
268 {".mpf", "application/vnd.ms-mediapackage"},
269 {".mpg", "video/mpeg"},
270 {".mpp", "application/vnd.ms-project"},
271 {".mpv2", "video/mpeg"},
272 {".mqv", "video/quicktime"},
273 {".ms", "application/x-troff-ms"},
274 {".msi", "application/octet-stream"},
275 {".mso", "application/octet-stream"},
276 {".mts", "video/vnd.dlna.mpeg-tts"},
277 {".mtx", "application/xml"},
278 {".mvb", "application/x-msmediaview"},
279 {".mvc", "application/x-miva-compiled"},
280 {".mxp", "application/x-mmxp"},
281 {".nc", "application/x-netcdf"},
282 {".nsc", "video/x-ms-asf"},
283 {".nws", "message/rfc822"},
284 {".ocx", "application/octet-stream"},
285 {".oda", "application/oda"},
286 {".odc", "text/x-ms-odc"},
287 {".odh", "text/plain"},
288 {".odl", "text/plain"},
289 {".odp", "application/vnd.oasis.opendocument.presentation"},
290 {".ods", "application/oleobject"},
291 {".odt", "application/vnd.oasis.opendocument.text"},
292 {".one", "application/onenote"},
293 {".onea", "application/onenote"},
294 {".onepkg", "application/onenote"},
295 {".onetmp", "application/onenote"},
296 {".onetoc", "application/onenote"},
297 {".onetoc2", "application/onenote"},
298 {".orderedtest", "application/xml"},
299 {".osdx", "application/opensearchdescription+xml"},
300 {".p10", "application/pkcs10"},
301 {".p12", "application/x-pkcs12"},
302 {".p7b", "application/x-pkcs7-certificates"},
303 {".p7c", "application/pkcs7-mime"},
304 {".p7m", "application/pkcs7-mime"},
305 {".p7r", "application/x-pkcs7-certreqresp"},
306 {".p7s", "application/pkcs7-signature"},
307 {".pbm", "image/x-portable-bitmap"},
308 {".pcast", "application/x-podcast"},
309 {".pct", "image/pict"},
310 {".pcx", "application/octet-stream"},
311 {".pcz", "application/octet-stream"},
312 {".pdf", "application/pdf"},
313 {".pfb", "application/octet-stream"},
314 {".pfm", "application/octet-stream"},
315 {".pfx", "application/x-pkcs12"},
316 {".pgm", "image/x-portable-graymap"},
317 {".pic", "image/pict"},
318 {".pict", "image/pict"},
319 {".pkgdef", "text/plain"},
320 {".pkgundef", "text/plain"},
321 {".pko", "application/vnd.ms-pki.pko"},
322 {".pls", "audio/scpls"},
323 {".pma", "application/x-perfmon"},
324 {".pmc", "application/x-perfmon"},
325 {".pml", "application/x-perfmon"},
326 {".pmr", "application/x-perfmon"},
327 {".pmw", "application/x-perfmon"},
328 {".png", "image/png"},
329 {".pnm", "image/x-portable-anymap"},
330 {".pnt", "image/x-macpaint"},
331 {".pntg", "image/x-macpaint"},
332 {".pnz", "image/png"},
333 {".pot", "application/vnd.ms-powerpoint"},
334 {".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"},
335 {".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"},
336 {".ppa", "application/vnd.ms-powerpoint"},
337 {".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"},
338 {".ppm", "image/x-portable-pixmap"},
339 {".pps", "application/vnd.ms-powerpoint"},
340 {".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"},
341 {".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"},
342 {".ppt", "application/vnd.ms-powerpoint"},
343 {".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"},
344 {".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
345 {".prf", "application/pics-rules"},
346 {".prm", "application/octet-stream"},
347 {".prx", "application/octet-stream"},
348 {".ps", "application/postscript"},
349 {".psc1", "application/PowerShell"},
350 {".psd", "application/octet-stream"},
351 {".psess", "application/xml"},
352 {".psm", "application/octet-stream"},
353 {".psp", "application/octet-stream"},
354 {".pub", "application/x-mspublisher"},
355 {".pwz", "application/vnd.ms-powerpoint"},
356 {".qht", "text/x-html-insertion"},
357 {".qhtm", "text/x-html-insertion"},
358 {".qt", "video/quicktime"},
359 {".qti", "image/x-quicktime"},
360 {".qtif", "image/x-quicktime"},
361 {".qtl", "application/x-quicktimeplayer"},
362 {".qxd", "application/octet-stream"},
363 {".ra", "audio/x-pn-realaudio"},
364 {".ram", "audio/x-pn-realaudio"},
365 {".rar", "application/octet-stream"},
366 {".ras", "image/x-cmu-raster"},
367 {".rat", "application/rat-file"},
368 {".rc", "text/plain"},
369 {".rc2", "text/plain"},
370 {".rct", "text/plain"},
371 {".rdlc", "application/xml"},
372 {".resx", "application/xml"},
373 {".rf", "image/vnd.rn-realflash"},
374 {".rgb", "image/x-rgb"},
375 {".rgs", "text/plain"},
376 {".rm", "application/vnd.rn-realmedia"},
377 {".rmi", "audio/mid"},
378 {".rmp", "application/vnd.rn-rn_music_package"},
379 {".roff", "application/x-troff"},
380 {".rpm", "audio/x-pn-realaudio-plugin"},
381 {".rqy", "text/x-ms-rqy"},
382 {".rtf", "application/rtf"},
383 {".rtx", "text/richtext"},
384 {".ruleset", "application/xml"},
385 {".s", "text/plain"},
386 {".safariextz", "application/x-safari-safariextz"},
387 {".scd", "application/x-msschedule"},
388 {".sct", "text/scriptlet"},
389 {".sd2", "audio/x-sd2"},
390 {".sdp", "application/sdp"},
391 {".sea", "application/octet-stream"},
392 {".searchConnector-ms", "application/windows-search-connector+xml"},
393 {".setpay", "application/set-payment-initiation"},
394 {".setreg", "application/set-registration-initiation"},
395 {".settings", "application/xml"},
396 {".sgimb", "application/x-sgimb"},
397 {".sgml", "text/sgml"},
398 {".sh", "application/x-sh"},
399 {".shar", "application/x-shar"},
400 {".shtml", "text/html"},
401 {".sit", "application/x-stuffit"},
402 {".sitemap", "application/xml"},
403 {".skin", "application/xml"},
404 {".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"},
405 {".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"},
406 {".slk", "application/vnd.ms-excel"},
407 {".sln", "text/plain"},
408 {".slupkg-ms", "application/x-ms-license"},
409 {".smd", "audio/x-smd"},
410 {".smi", "application/octet-stream"},
411 {".smx", "audio/x-smd"},
412 {".smz", "audio/x-smd"},
413 {".snd", "audio/basic"},
414 {".snippet", "application/xml"},
415 {".snp", "application/octet-stream"},
416 {".sol", "text/plain"},
417 {".sor", "text/plain"},
418 {".spc", "application/x-pkcs7-certificates"},
419 {".spl", "application/futuresplash"},
420 {".src", "application/x-wais-source"},
421 {".srf", "text/plain"},
422 {".SSISDeploymentManifest", "text/xml"},
423 {".ssm", "application/streamingmedia"},
424 {".sst", "application/vnd.ms-pki.certstore"},
425 {".stl", "application/vnd.ms-pki.stl"},
426 {".sv4cpio", "application/x-sv4cpio"},
427 {".sv4crc", "application/x-sv4crc"},
428 {".svc", "application/xml"},
429 {".swf", "application/x-shockwave-flash"},
430 {".t", "application/x-troff"},
431 {".tar", "application/x-tar"},
432 {".tcl", "application/x-tcl"},
433 {".testrunconfig", "application/xml"},
434 {".testsettings", "application/xml"},
435 {".tex", "application/x-tex"},
436 {".texi", "application/x-texinfo"},
437 {".texinfo", "application/x-texinfo"},
438 {".tgz", "application/x-compressed"},
439 {".thmx", "application/vnd.ms-officetheme"},
440 {".thn", "application/octet-stream"},
441 {".tif", "image/tiff"},
442 {".tiff", "image/tiff"},
443 {".tlh", "text/plain"},
444 {".tli", "text/plain"},
445 {".toc", "application/octet-stream"},
446 {".tr", "application/x-troff"},
447 {".trm", "application/x-msterminal"},
448 {".trx", "application/xml"},
449 {".ts", "video/vnd.dlna.mpeg-tts"},
450 {".tsv", "text/tab-separated-values"},
451 {".ttf", "application/octet-stream"},
452 {".tts", "video/vnd.dlna.mpeg-tts"},
453 {".txt", "text/plain"},
454 {".u32", "application/octet-stream"},
455 {".uls", "text/iuls"},
456 {".user", "text/plain"},
457 {".ustar", "application/x-ustar"},
458 {".vb", "text/plain"},
459 {".vbdproj", "text/plain"},
460 {".vbk", "video/mpeg"},
461 {".vbproj", "text/plain"},
462 {".vbs", "text/vbscript"},
463 {".vcf", "text/x-vcard"},
464 {".vcproj", "Application/xml"},
465 {".vcs", "text/plain"},
466 {".vcxproj", "Application/xml"},
467 {".vddproj", "text/plain"},
468 {".vdp", "text/plain"},
469 {".vdproj", "text/plain"},
470 {".vdx", "application/vnd.ms-visio.viewer"},
471 {".vml", "text/xml"},
472 {".vscontent", "application/xml"},
473 {".vsct", "text/xml"},
474 {".vsd", "application/vnd.visio"},
475 {".vsi", "application/ms-vsi"},
476 {".vsix", "application/vsix"},
477 {".vsixlangpack", "text/xml"},
478 {".vsixmanifest", "text/xml"},
479 {".vsmdi", "application/xml"},
480 {".vspscc", "text/plain"},
481 {".vss", "application/vnd.visio"},
482 {".vsscc", "text/plain"},
483 {".vssettings", "text/xml"},
484 {".vssscc", "text/plain"},
485 {".vst", "application/vnd.visio"},
486 {".vstemplate", "text/xml"},
487 {".vsto", "application/x-ms-vsto"},
488 {".vsw", "application/vnd.visio"},
489 {".vsx", "application/vnd.visio"},
490 {".vtx", "application/vnd.visio"},
491 {".wav", "audio/wav"},
492 {".wave", "audio/wav"},
493 {".wax", "audio/x-ms-wax"},
494 {".wbk", "application/msword"},
495 {".wbmp", "image/vnd.wap.wbmp"},
496 {".wcm", "application/vnd.ms-works"},
497 {".wdb", "application/vnd.ms-works"},
498 {".wdp", "image/vnd.ms-photo"},
499 {".webarchive", "application/x-safari-webarchive"},
500 {".webtest", "application/xml"},
501 {".wiq", "application/xml"},
502 {".wiz", "application/msword"},
503 {".wks", "application/vnd.ms-works"},
504 {".WLMP", "application/wlmoviemaker"},
505 {".wlpginstall", "application/x-wlpg-detect"},
506 {".wlpginstall3", "application/x-wlpg3-detect"},
507 {".wm", "video/x-ms-wm"},
508 {".wma", "audio/x-ms-wma"},
509 {".wmd", "application/x-ms-wmd"},
510 {".wmf", "application/x-msmetafile"},
511 {".wml", "text/vnd.wap.wml"},
512 {".wmlc", "application/vnd.wap.wmlc"},
513 {".wmls", "text/vnd.wap.wmlscript"},
514 {".wmlsc", "application/vnd.wap.wmlscriptc"},
515 {".wmp", "video/x-ms-wmp"},
516 {".wmv", "video/x-ms-wmv"},
517 {".wmx", "video/x-ms-wmx"},
518 {".wmz", "application/x-ms-wmz"},
519 {".wpl", "application/vnd.ms-wpl"},
520 {".wps", "application/vnd.ms-works"},
521 {".wri", "application/x-mswrite"},
522 {".wrl", "x-world/x-vrml"},
523 {".wrz", "x-world/x-vrml"},
524 {".wsc", "text/scriptlet"},
525 {".wsdl", "text/xml"},
526 {".wvx", "video/x-ms-wvx"},
527 {".x", "application/directx"},
528 {".xaf", "x-world/x-vrml"},
529 {".xaml", "application/xaml+xml"},
530 {".xap", "application/x-silverlight-app"},
531 {".xbap", "application/x-ms-xbap"},
532 {".xbm", "image/x-xbitmap"},
533 {".xdr", "text/plain"},
534 {".xht", "application/xhtml+xml"},
535 {".xhtml", "application/xhtml+xml"},
536 {".xla", "application/vnd.ms-excel"},
537 {".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"},
538 {".xlc", "application/vnd.ms-excel"},
539 {".xld", "application/vnd.ms-excel"},
540 {".xlk", "application/vnd.ms-excel"},
541 {".xll", "application/vnd.ms-excel"},
542 {".xlm", "application/vnd.ms-excel"},
543 {".xls", "application/vnd.ms-excel"},
544 {".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"},
545 {".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"},
546 {".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
547 {".xlt", "application/vnd.ms-excel"},
548 {".xltm", "application/vnd.ms-excel.template.macroEnabled.12"},
549 {".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"},
550 {".xlw", "application/vnd.ms-excel"},
551 {".xml", "text/xml"},
552 {".xmta", "application/xml"},
553 {".xof", "x-world/x-vrml"},
554 {".XOML", "text/plain"},
555 {".xpm", "image/x-xpixmap"},
556 {".xps", "application/vnd.ms-xpsdocument"},
557 {".xrm-ms", "text/xml"},
558 {".xsc", "application/xml"},
559 {".xsd", "text/xml"},
560 {".xsf", "text/xml"},
561 {".xsl", "text/xml"},
562 {".xslt", "text/xml"},
563 {".xsn", "application/octet-stream"},
564 {".xss", "application/xml"},
565 {".xtp", "application/octet-stream"},
566 {".xwd", "image/x-xwindowdump"},
567 {".z", "application/x-compress"},
568 {".zip", "application/x-zip-compressed"},
569 };
570
571 public static string GetMimeType (string extension)
572 {
573 if (extension == null) {
574 throw new ArgumentNullException ("extension");
575 }
576
577 if (!extension.StartsWith (".")) {
578 extension = "." + extension;
579 }
580
581 string mime;
582
583 return _mappings.TryGetValue (extension, out mime) ? mime : "application/octet-stream";
584 }
585 }
586}
587
Note: See TracBrowser for help on using the repository browser.