PageRenderTime 54ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/clbuild/source/cl-smtp/mime-types.lisp

https://bitbucket.org/nunb/weblocks-boxset-nunb
Lisp | 556 lines | 527 code | 11 blank | 18 comment | 9 complexity | 8877e1caea5b4f84a15a27963ca63146 MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0, BSD-3-Clause
  1. ;;; -*- mode: Lisp -*-
  2. ;;; This file is part of CL-SMTP, the Lisp SMTP Client
  3. ;;; Copyright (C) 2004/2005/2006/2007 Jan Idzikowski
  4. ;;; This library is free software; you can redistribute it and/or
  5. ;;; modify it under the terms of the Lisp Lesser General Public License
  6. ;;; (http://opensource.franz.com/preamble.html), known as the LLGPL.
  7. ;;; This library is distributed in the hope that it will be useful,
  8. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ;;; Lisp Lesser GNU General Public License for more details.
  11. ;;; File: attachments.lisp
  12. ;;; Description: encoding and transmitting login to include a mime attachment
  13. ;;;
  14. ;;; Contributed by Brian Sorg
  15. ;;;
  16. (in-package :cl-smtp)
  17. (eval-when (:compile-toplevel :load-toplevel)
  18. ;;; Some of the most common file extensions with the mime types and descriptions.
  19. ;;; Extracted from numberous webpages.
  20. (defparameter *mime-type-descriptions*
  21. '(("386" "application/octet-stream"
  22. "Windows Enhanced Mode Driver or Swap File")
  23. ("001" "application/x-001" "FAX Datafile")
  24. ("3GPP" "audio/3gpp"
  25. "3rd
  26. Generation Partnership Project. Multimedia over 3rd generation wireless
  27. networks. H.263 video is the mandatory video format in 3GPP and AMR is
  28. the main audio/speech format.")
  29. ("7CB" "application/vnd.ecdis-update"
  30. "Electronic Chart Display and Information System (ECDIS)")
  31. ("aa" "audio/audible" "Audible file format (audio books)")
  32. ("aab" "application/x-authorware-bin" "Macromedia Authorware Binary")
  33. ("aac" "audio/aac"
  34. "Advanced Audio Coding File. Part of MPEG-2 and MPEG-4 standard. (Apple iTunes Store)")
  35. ("aam" "application/x-authorware-map" "Authorware Map (Shockwave?)")
  36. ("aas" "application/x-authorware-seg"
  37. "Authorware Shocked Packet (Segment) ")
  38. ("aba" "text/x-palm-aba" "AddressBook Archive (Palm)")
  39. ("ac3" "audio/ac3"
  40. "Adaptive Transform Coder 3 (relates to the bitstream format of Dolby Digital)")
  41. ("adr" "application/x-msaddr" "Address Book")
  42. ("aexpk" "application/pgp-keys" "Armored extracted public key (PGP)")
  43. ("afl" "video/animaflex" "Font file (for Allways) (Lotus 1-2-3)")
  44. ("ahtml" "magnus-internal/cgi-advertiser" " ")
  45. ("ai" "application/postscript"
  46. "Encapsulated PostScript (metafile) (Adobe Illustrator)")
  47. ("aif" "audio/x-aiff" "Audio Interchange File Format")
  48. ("aifc" "audio/x-aiff" "Audio Interchange File Format")
  49. ("aiff" "audio/x-aiff" "Audio Interchange File Format")
  50. ("aim" "application/x-aim" "AIM file - AOL Instant Messanger")
  51. ("alt" "application/x-up-alert" "Menu file (WordPerfect Library)")
  52. ("aos" "application/x-nokia-" "Add-On Software (Nokia 9000)")
  53. ("arj" "application/x-arj"
  54. "Compressed file archive created by ARJ or winzip")
  55. ("art" "image/x-jg"
  56. "AOL Johnson-Grace Compressed File and Another Ray Tracer Format")
  57. ("asc" "application/pgp-encrypted" "Armored Encrypted file (PGP)")
  58. ("asd" "application/astound" "Autosave file (Word for Windows)")
  59. ("asf" "application/vnd.ms-asf video/x-ms-asf video/x-ms-wm"
  60. "Windows Media file - Advanced Streaming Format (ASF), NetShow")
  61. ("asn" "application/astound" " ")
  62. ("asp" "text/html"
  63. "Active Server Pages - standard HTML documents interlaced with ActiveX script code ")
  64. ("asr" "video/x-ms-asf" "Microsoft NetShow")
  65. ("asx" "video/x-ms-asf application/x-mplayer2"
  66. "VXtreme (Microsoft streaming AV)")
  67. ("asz" "application/astound" " ")
  68. ("au" "audio/basic" "8-bit u-law [PCM] / 8000 Hz")
  69. ("avi" "video/x-msvideo" "Windows Video file")
  70. ("axs" "application/olescript" " ")
  71. ("bas" "text/plain" "BASIC program")
  72. ("bat" "application/octet-stream" "DOS BAT (Batch) file.")
  73. ("bcpio" "application/x-bcpio" "Old Binary CPIO")
  74. ("bexpk" "application/pgp-keys" "binary extracted public key (PGP)")
  75. ("bin" "application/octet-stream" "Uninterpreted Binary Data")
  76. ("bk" "application/vnd.framemaker" "FrameMaker book ")
  77. ("bleep" "application/bleeper" " ")
  78. ("bmp" "image/x-bmp" "Windows Bitmap (PaintBrush)")
  79. ("btf" "image/prs.btf" "NationsBank Check Images (also .btif)")
  80. ("c" "text/plain" "C program")
  81. ("c++" "text/plain" "C program")
  82. ("cab" "application/cab"
  83. "Cabinet file Microsoft installation archive. opersyss=win32, mac cpu=x86, ppc, mips, alpha")
  84. ("cal" "application/x-msschedplus" "MS schedplus or calendar")
  85. ("cat" "application/pdf"
  86. "PDF Catalog (Used with Acrobat Reader and Search plug-in)")
  87. ("cat" "application/vnd.ms-pki.seccat" "Security Catalog")
  88. ("ccs" "text/ccs"
  89. "Cluster Configuration System used with the Global File System (GFS) in Red Hat Linux")
  90. ("cdda" "audio/aiff" "CD Audio Track")
  91. ("cda" "audio/x-cda" "CD Audio Track")
  92. ("cdf" "text/plain" "Channel Definition Format - MS push std")
  93. ("cdr" "application/x-coreldrw" "Corel Draw (metafile)")
  94. ("cer" " application/pkix-cert" "Certificatefile")
  95. ("cfm" "wwwserver/wsapi" "Cold Fusion Markup")
  96. ("cgi" "magnus-internal/cgi" "Common Gateway Interface")
  97. ("cgm" "image/cgm" "Computer Graphics Metafile ")
  98. ("chat" "application/x-chat" " ")
  99. ("che" "application/x-up-cacheop" " ")
  100. ("cht" "audio/x-dspeech"
  101. "Chart (Harvard Graphics 2.0 - SoftCraft Presenter)")
  102. ("cil" "application/vnd.ms-artgalry" "Clip Gallery Download Packages")
  103. ("class" "application/java-vm" "Java")
  104. ("cli" "application/vnd.ms-artgalry" " ")
  105. ("clp" "application/x-msclip" "Windows Clipboard (metafile)")
  106. ("cmx" "image/x-cmx" " ")
  107. ("cnc" "application/x-cnc" "CNC general program data")
  108. ("cod" "image/cis-cod"
  109. "Datafile (Forecast Plus - MS Multiplan - StatPac Gold)")
  110. ("coda" "application/x-coda" " ")
  111. ("com" "application/octet-stream"
  112. "DOS COM Executable (similar to exe, but a direct memory image)")
  113. ("cpi" "image/cpi" "ColorLab Processed Image ")
  114. ("cpio" "application/x-cpio" "IEEE Std1003.2 (`POSIX') CPIO")
  115. ("cpt" "application/mac-compactpro" "Compact Pro Archive")
  116. ("crd" "application/x-mscardfile" "MS cardfile")
  117. ("crt" "application/x-x509-ca-cert" "Certificatefile")
  118. ("csh" "application/x-csh" "CSH Script")
  119. ("csm" "application/x-cu-seeme" "Precompiled headers (Borland C++ 4.5)")
  120. ("css" "text/css" "Cascading Style Sheets")
  121. ("csv" "text/csv"
  122. "Comma-Separated Values (Excel, Lotus 123, FoxPro, MS Outlook)")
  123. ("ct" "image/" "Iris CT Graphic or Scitex CT Handshake Bitmap ")
  124. ("cu" "application/x-cu-seeme" " ")
  125. ("cut" "image/x-halo-cut" "Bitmap graphics")
  126. ("dat" "application/octet-stream"
  127. "Data file. Can be anything, text, graphics, binary, ...")
  128. ("dba" "text/x-palm-dba" "DateBook Archive (Palm)")
  129. ("dbf" "application/octet-stream" "DataBase File (FoxPro, dBase) ")
  130. ("dbm" "wwwserver/wsapi" "ColdFusion IIS Plugin")
  131. ("dca" "application/dca-rft" "IBM Doc Content Arch")
  132. ("dcr" "application/x-director" "Macromedia Director (Shockwave)")
  133. ("deb" "application/octet-stream" "Binary for debian UNIX")
  134. ("der" "application/x-x509-ca-cert" "Certificatefile")
  135. ("dir" "application/x-director" "Macromedia Director (Shockwave)")
  136. ("dll" "application/x-msdownload"
  137. "Dynamically Linked Library (DOS) pe-portable executable opersys=win32, mac cpu=x86, ppc, mips, alpha")
  138. ("dms" "application/octet-stream"
  139. "Compressed Amiga file archive created by DISKMASHER")
  140. ("doc" "application/msword" "MS Word")
  141. ("dot" "application/msword" "MS Word (Template)")
  142. ("dsf" "image/x-mgx-dsf" "Micrografx Designer 6 (metafile)")
  143. ("dst" "application/tajima" "PC-RDist Distribution file ")
  144. ("dtd" "text/xml" "SGML Document (Type) Definition file")
  145. ("dus" "audio/x-dspeech" "Readiris font dictionary")
  146. ("dvi" "application/x-dvi" "TeX DVI (Device Independent)")
  147. ("dwc" "application/dwc" "compressed archive")
  148. ("dwf" "drawing/x-dwf" "Autodesk WHIP! Drawing Web file")
  149. ("dwg" "application/x-acad" "AutoCAD Drawing")
  150. ("dxf" "application/vnd.dxf"
  151. "Drawing eXchange Format, Data Exchange File, AutoCAD (vector)")
  152. ("dxr" "application/x-director" "Macromedia Director (Shockwave)")
  153. ("ebk" "application/x-expandedbook" " ")
  154. ("emf" "image/x-emf"
  155. "Enhanced metafile created in Microsoft Windows and Visio 2002 applications")
  156. ("eml" "message/rfc822"
  157. "MS Internet Mail Message (Outlook Express and others)")
  158. ("enc" "application/pre-encrypted"
  159. "Pre-encrypted Data (also Sniffer trace)")
  160. ("eps" "application/postscript" "Encapsulated PostScript (raster)")
  161. ("erf" "application/x-hsp-erf" " ")
  162. ("es" "audio/echospeech" " ")
  163. ("etf" "image/x-etf" "Enriched Text file")
  164. ("etx" "text/x-setext" "Structure Enchanced Text")
  165. ("evy" "application/x-envoy" "Document (WordPerfect Envoy)")
  166. ("exe" "application/x-pe-"
  167. "pe-portable executable opersys=win32, mac cpu=x86, ppc, mips, alpha")
  168. ("fdf" "application/vnd.fdf" "acrobat reader")
  169. ("fh4" "image/x-freehand" "Vector graphics (Aldus FreeHand 4.x)")
  170. ("fh5" "image/x-freehand" "Freehand 5")
  171. ("fhc" "image/x-freehand" "Freehand")
  172. ("fif" "image/fif" "Fractal Image Format file")
  173. ("fla" "application/x-shockwave-flash" " ")
  174. ("flac" "audio/flac" "Free Lossless Audio Codec")
  175. ("flc" "video/flc " "FLIC Animated Picture Autodesk ")
  176. ("fli" "video/fli " "FLIC Animated Picture Autodesk ")
  177. ("fm" "application/vnd.framemaker " "FrameMaker Document")
  178. ("fm3" "application/x-maker " "FrameMaker")
  179. ("fm4" "application/vnd.framemaker" "FrameMaker")
  180. ("fm5" "application/vnd.framemaker" "FrameMaker")
  181. ("fml" "application/fml" " ")
  182. ("fp5" "application/filemaker5" "FileMaker Pro")
  183. ("frl" "application/freeloader" "FormFlow file")
  184. ("frm" "application/vnd.framemaker" "FrameMaker")
  185. ("fs" "application/X-FSRecipe" " ")
  186. ("g3f" "image/g3fax" "Group III FAX")
  187. ("gb" "application/chinese-gb" "Chinese Text")
  188. ("gif" "image/gif"
  189. "GIF - Graphics Interchange Format - Compuserve (raster)")
  190. ("gsd" "audio/x-gsm" "GSM Internet Realtime Audio ")
  191. ("gsm" "audio/x-gsm" "Raw GSM 6.10 Audio Stream ")
  192. ("gtar" "application/x-gtar" "Gnu Tar")
  193. ("gz" "application/x-gzip" "Unix Gzip (gnu-compress ecnapsulation)")
  194. ("hdf" "application/x-hdf" "NCSA HDF (Hierarchical Data Format)")
  195. ("hdml" "text/x-hdml" " ")
  196. ("hlb" "vms/help" "VMS help libraries")
  197. ("hlp" "application/x-mshelp" "Windows Help")
  198. ("hpgl" "application/vnd.hp-HPGL" "HP Graphic Language")
  199. ("hqx" "application/mac-binhex40"
  200. "BinHex 4.0 Format - Macintosh Binary to ASCII conversion.")
  201. ("htm" "text/html" "HTML - HyperText Markup Language")
  202. ("html" "text/html" "HTML - HyperText Markup Language")
  203. ("hz" "application/chinese-hz" "Chinese")
  204. ("ica" "application/x-ica"
  205. "Bitmap graphics (Image Object Content Architecture)")
  206. ("ice" "x-conference/x-cooltalk" " ")
  207. ("ico" "image/ico" "Windows icon")
  208. ("icq" "application/x-icq" "Saved ")
  209. ("ics" "text/calendar" "iCalendar Calendar Data (Mac)")
  210. ("ief" "image/ief" "Image Exchange Format")
  211. ("iff" "image/iff " "Amiga Bitmap Graphic ")
  212. ("iges" "model/iges" " ")
  213. ("img" "image/img"
  214. "Venture Publisher, GEM Draw (bit mapped), AutoCAD CAD-Camera, others")
  215. ("inc" "text/plain" " ")
  216. ("inf" "application/x-setupscript"
  217. "Setup scripts (For Installing Drivers, etc.), Autorun - auto-start file for a CD-ROM")
  218. ("ins" "application/x-NET-Install" "Data (WordPerfect)")
  219. ("ipx" "application/x-ipix" "IPIX AV file")
  220. ("isapi" "wwwserver/isapi"
  221. "Internet Server API - Application Program(ming) Interface")
  222. ("ivr" "i-world/i-vrml" "Virtual Reality World Live Picture ")
  223. ("jar" "application/java-archive" " ")
  224. ("java" "text/plain" " ")
  225. ("jfx" "application/octet-stream"
  226. "eFax Fax Document (J2 Global Communications ")
  227. ("jpe" "image/jpeg" "JPEG-JFIF - Joint Photographic Experts Group")
  228. ("jpeg" "image/jpeg" "JPEG-JFIF - Joint Photographic Experts Group")
  229. ("jpg" "image/jpeg"
  230. "JPEG-JFIF - Joint Photographic Experts Group (raster)")
  231. ("jps" "image/x-jps" "Stereo Image")
  232. ("js" "application/x-javascript" "Java Script")
  233. ("jsc" "application/x-javascript-config" " ")
  234. ("jsp" "magnus-internal/jsp" "Java Script")
  235. ("la" "audio/nspaudio" "Netscape Packetized audio ")
  236. ("latex" "application/x-latex" "LaTeX Source")
  237. ("ldif" "text/x-ldif"
  238. "LDAP Data Interchange Format ( Netscape Address Book)")
  239. ("lha" "application/octet-stream" "LHA Archive")
  240. ("lisp" "text/plain" "Lisp Files")
  241. ("lma" "audio/nspaudio" "Netscape Packetized audio ")
  242. ("loe" "application/vnd.framemaker" "FrameMaker list of exhibits ")
  243. ("lof" "application/vnd.framemaker" "FrameMaker list of figures ")
  244. ("lot" "application/vnd.framemaker" "FrameMaker list of tables ")
  245. ("lwp" "WordPro 9.5 " " ")
  246. ("lzh" "application/octet-stream" "compressed")
  247. ("lzs" "application/octet-stream" "compressed")
  248. ("lzx" "application/octet-stream" "compressed")
  249. ("m13" "application/x-msmediaview" "MS mediaview")
  250. ("m14" "application/x-msmediaview" "MS mediaview")
  251. ("m3u" "audio/x-mpegurl" "Music Playlist (Winamp)")
  252. ("m4a" "audio/" "Apple iTunes AAC and ALE unprotected")
  253. ("ma" "application/mathmetica" "Mathmetica Notebook")
  254. ("m4p" "audio/" "Apple iTunes AAC protected")
  255. ("m4b" "audio/" "Apple iTunes AAC protected autiobook")
  256. ("man" "application/x-troff-man" "Troff w/MAN Macros")
  257. ("map" "application/x-httpd-imap" "Image Configuration File (HTML Image Map)")
  258. ("mbd" "application/mbedlet" " ")
  259. ("mcf" "image/vasa" "Mathcad font")
  260. ("mda" "application/x-msaccess" "MS Access (May not be desirable)")
  261. ("mdb" "application/x-msaccess" "MS access")
  262. ("me" "application/x-troff-me" "Troff w/ME Macros")
  263. ("mesh" "model/mesh" " ")
  264. ("mfp" "application/mirage" " ")
  265. ("mht" "message/rfc822" "Microsoft Web Archiv")
  266. ("mid" "audio/x-midi" "MIDI")
  267. ("midi" "audio/x-midi" "MIDI")
  268. ("mif" "application/vnd.mif" "Maker Interchange Format (FrameMaker)")
  269. ("mime" "message/rfc822"
  270. "base64 (6-bit) is the standard for encoding binary attachme")
  271. ("mk" "application/vnd.framemaker" "FrameMaker")
  272. ("mmf" "application/x-smaf application/vnd.smaf"
  273. "SMAF = \"Synthetic music Mobile Application Format\" - Polyphonic Ringtone File for Phones - Yamaha")
  274. ("mmm" "application/pdf" "Acrobat Media Clip")
  275. ("mny" "application/x-msmoney" "MS money")
  276. ("mocha" "application/x-javascript" "Java Script")
  277. ("mol" "chemical/x-mdl-molfile" "MDL Molfile ")
  278. ("mov" "video/quicktime" "QuickTime digital video")
  279. ("movie" "video/x-sgi-movie" "SGI \"movieplayer\" movie")
  280. ("mp2" "audio/mpeg" "MPEG Audio Stream, Layer II ")
  281. ("mp3" "audio/mpeg" "MPEG Audio Stream, Layer III ")
  282. ("mp4" "video/mp4v-es"
  283. "MPEG Audio Stream, Layer IV (QuickTime and RealPlayer)")
  284. ("mpa" "audio/mpeg" "MPEG Audio Stream, Layer I, II or III ")
  285. ("mpe" "video/mpeg" "MPEG - Motion Picture Experts Group")
  286. ("mpeg" "video/mpeg" "MPEG - Motion Picture Experts Group")
  287. ("mpg" "video/mpeg" "MPEG - Motion Picture Experts Group")
  288. ("mpga" "audio/mpeg" " ")
  289. ("mpire" "application/x-mpire" " ")
  290. ("mpl" "application/x-mpire" " ")
  291. ("mpp" "application/vnd.ms-project" "MS Project")
  292. ("mpt" "application/vnd.ms-project" "MS Project")
  293. ("mpv" "application/vnd.ms-project" "MS Project view")
  294. ("mpw" "application/vnd.ms-project" "MS Project")
  295. ("mpx" "application/vnd.ms-project" "MS Project")
  296. ("ms" "application/x-troff-ms" "Troff w/MS Macros")
  297. ("msh" "model/mesh" "2 and 2-D visualization")
  298. ("n2p" "application/n2p" " ")
  299. ("nc" "application/x-netcdf" "Unidata netCDF data file")
  300. ("npx" "application/x-netfpx" " ")
  301. ("nsc" "application/x-nschat" "Noder file (Polish)")
  302. ("nsf" "application/x-notes" "Lotus Notes ")
  303. ("ntf" "application/x-notes" "Lotus Notes ")
  304. ("ocx" "application/x-oleobject"
  305. "Object Linking and Embedding (OLE) Control Extension (ActiveX Control)")
  306. ("oda" "application/oda" "ODA/ODIF Open Document Architecture ")
  307. ("ods" "application/vnd.oasis.opendocument.spreadsheet"
  308. "Open Office Version 2 spreedsheet")
  309. ("odt" "application/vnd.oasis.opendocument.text;"
  310. "Open Office Version 2 writer")
  311. ("odp" "application/vnd.oasis.opendocument.presentation"
  312. "Open Office Version 2 presentor")
  313. ("ofml" "application/fml" " ")
  314. ("ogg" "audio/x-ogg" "Ogg Vorbis open-source audio format")
  315. ("olb" "vms/olb" "Vax Object Library or MS Project Object Library")
  316. ("or2" "application/x-organizer" "Lotus Organizer")
  317. ("ovl" "application/octet-stream" "PC OVL File")
  318. ("pac" "application/x-ns-proxy-autoconfig" " ")
  319. ("page" "application/x-coda" " ")
  320. ("pbd" "application/vnd.powerbuilder6" "Phone book (FaxNOW! - Faxit)")
  321. ("pbm" "image/x-portable-bitmap" "PBM Bitmap Format")
  322. ("pcd" "image/x-photo-cd" "Kodak Photo CD (raster)")
  323. ("pcl" "application/pcl" "
  324. Printer Control Language (HP)")
  325. ("pcx" "image/pcx" "PC Paintbrush (ZSoft Image)")
  326. ("pdb" "text/x-palm-pdb" "Palm Database File")
  327. ("pdf" "application/pdf" "Portable Document Format (Adobe Acrobat)")
  328. ("pfm" "application/pdf" "Acrobat Font")
  329. ("pfr" "application/font-tdpfr" " ")
  330. ("pgm" "image/x-portable-graymap" "PBM Graymap Format")
  331. ("pgp" "application/pgp-encrypted" "PGP Encrypted file ")
  332. ("pgr" "text/parsnegar-document" " ")
  333. ("php3" "application/x-httpd-php3" " ")
  334. ("phtml" "application/x-httpd-php" "PHP Script ")
  335. ("pic" "image/pict" "Macintosh QuickDraw format (metafile)")
  336. ("pict" "image/pict" "Macintosh QuickDraw format (metafile)")
  337. ("pif" "application/x-mspif" "Program Information File (Windows)")
  338. ("pkr" "application/pgp-keys" "Public Keyring (PGP)")
  339. ("pnc" "text/x-palm-pnc" "Palm Network Configuration File")
  340. ("png" "image/png" "Portable Network Graphics")
  341. ("pnm" "image/x-portable-anymap" "PBM Anymap Format")
  342. ("pot" "application/ms-powerpoint" "MS PowerPoint template")
  343. ("ppa" "application/vnd.ms-powerpoint" "MS PowerPoint addin")
  344. ("ppm" "image/x-portable-pixmap" "PBM Pixmap Format")
  345. ("pps" "application/ms-powerpoint" "MS PowerPoint Slideshow")
  346. ("ppt" "application/ms-powerpoint" "MS PowerPoint Presentation")
  347. ("ppz" "applications/ms-powerpoint" "MS PowerPoint Animation")
  348. ("pqa" "text/x-palm-pqa" "Palm Query Application")
  349. ("pqf" "application/x-cprplayer" " ")
  350. ("pqi" "application/cprplayer" "Power Quest Drive imaging")
  351. ("prc" "text/x-palm-prc" "Palm Application")
  352. ("prvkr" "application/pgp-keys" "Private Keyring (PGP)")
  353. ("ps" "application/postscript" "PostScript")
  354. ("psd" "image/x-photoshop" "Adobe PhotoShop Image")
  355. ("psr" "application/datawindow" "Project Scheduler Resource file")
  356. ("ptlk" "application/listenup" " ")
  357. ("pub" "application/x-mspublisher" "MS publisher or PageMaker 2")
  358. ("pubkr" "application/pgp-keys" "Public Keyring (PGP)")
  359. ("push" "multipart/x-mixed-replace" " ")
  360. ("qd3" "x-world/x-3dmf" "Data file - segment 3 (Omnis Quartz)")
  361. ("qd3d" "x-world/x-3dmf" " ")
  362. ("qrt" "application/quest" "Qrt ray tracing graphics")
  363. ("qt" "video/quicktime" "QuickTime")
  364. ("ra" "audio/x-realaudio" "Music (RealAudio)")
  365. ("ram" "audio/x-pn-realaudio" "Real Audio Player")
  366. ("ras" "image/x-cmu-raster" "Sun Raster Format (raster)")
  367. ("rax" "audio/" "RealAudio 10 - RealMedia Streaming File")
  368. ("rgb" "image/x-rgb" "RGB Color Image")
  369. ("rip" "image/rip" "Graphics (Remote Access)")
  370. ("rm" "audio/x-pn-realaudio" " ")
  371. ("rmf" "audio/x-rmf" "Rich Music Format audio file from Beatnik")
  372. ("rmi" "audio/mid" "MIDI File ")
  373. ("roff" "application/x-troff" "Troff")
  374. ("rpm" "audio/x-pn-realaudio-plugin"
  375. "Real Audio Plugin and RedHat Package Manager")
  376. ("rrf" "application/x-InstallFromTheWeb" " ")
  377. ("rtc" "application/rtc" " ")
  378. ("rtf" "application/rtf" "Rich Text Format (Microsoft)")
  379. ("rtx" "text/richtext" "MIME Richtext format (see also rtf)")
  380. ("rtsp" "application/x-rtsp"
  381. "QuickTime Real-Time Streaming Protocol File ")
  382. ("sb" "application/x-xsb" "Superbook")
  383. ("sbx" "application/x-xsb"
  384. "ArcView Spatial Index For Read-Write Shapefiles ")
  385. ("sca" "application/x-supercard" "Datafile (SCA)")
  386. ("scp" "text/x-palm-scp" "Palm Network Script File")
  387. ("sdp" "application/sdp" "Scalable Multicast (RealNetworks)")
  388. ("ser" "application/java-" " ")
  389. ("sgm" "text/x-sgml" "Standard Generalized Markup Lang (SGML)")
  390. ("sgml" "text/x-sgml" "Standard Generalized Markup Lang (SGML)")
  391. ("sh" "application/x-sh" "SH Script")
  392. ("shar" "application/x-shar" "Sh Shar")
  393. ("shtml" "magnus-internal/parsed-html" " ")
  394. ("shw" "application/presentations"
  395. "Presentation (Harvard Graphics 2.0 - CorelShow)")
  396. ("sig" "application/pgp-signature" "Detached signature file (PGP)")
  397. ("silo" "model/mesh" " ")
  398. ("sit" "application/x-stuffit"
  399. "StuffIt - Macintosh Compression Format. By Aladdin for Mac.")
  400. ("sitx" "application/x-stuffit"
  401. "StuffIt X file format integrates compression with security and safety options. By Aladdin for Mac.")
  402. ("skd" "application/x-koan" " ")
  403. ("skm" "application/x-koan" " ")
  404. ("skp" "application/x-koan" " ")
  405. ("skr" "application/pgp-keys" "Private Keyring (PGP)")
  406. ("skt" "application/x-koan" " ")
  407. ("smil" "application/smil"
  408. "SMIL Synchronized Multimedia Integration Language. App:RealPlayer")
  409. ("sml" "application/smil"
  410. "SMIL Synchronized Multimedia Integration Language")
  411. ("smp" "application/studiom" "Sample (sound file)")
  412. ("snd" "audio/basic" "8-bit u-law [PCM] / 8000 Hz Audio")
  413. ("spc" "text/x-palm-spc" "Palm Configuration File")
  414. ("spl" "application/futuresplash" "FutureSplash from FutureWave Sftwr")
  415. ("spr" "application/x-sprite" "Document letter (Sprint)")
  416. ("sprite" "application/x-sprite" " ")
  417. ("src" "application/x-wais-source" "WAIS Source")
  418. ("stk" "application/hstu" " ")
  419. ("stream" "audio/x-qt-stream" " ")
  420. ("sty" "application/msword" "MS Word Style sheet")
  421. ("sv4cpio" "application/x-sv4cpio" "SVR4 CPIO")
  422. ("sv4crc" "application/x-sv4crc" "SVR4 CPIO w/CRC")
  423. ("svf" "image/vnd" " ")
  424. ("svh" "image/svh" " ")
  425. ("svr" "x-world/x-svr" " ")
  426. ("swf" "application/x-shockwave-flash"
  427. "Macromedia Flash Format File for animations")
  428. ("sxc" "application/vnd.sun.xml.calc"
  429. "Open Office Version 1 Spreedsheet")
  430. ("sxi" "application/vnd.sun.xml.impress"
  431. "Open Office Version 1 Presentations")
  432. ("sxw" " application/vnd.sun.xml.writer"
  433. "Open Office Version 1 Writer")
  434. ("syl" "application/sylk"
  435. "SYLK - Symbolic Link WingZ/Excel/Lotus (old MultiPlan form")
  436. ("sys" "application/octet-stream" "PC System File")
  437. ("talk" "application/talker" "Text to Speech ")
  438. ("tar" "application/x-tar" "4.3BSD Tar ")
  439. ("targa" "image/targa" "Targa Image File")
  440. ("tbk" "application/toolbook" "Memo backup (dBASE IV - FoxPro)")
  441. ("tcl" "application/x-tcl" "TCL Script")
  442. ("tda" "text/x-palm-tda" "ToDo Archive (Palm)")
  443. ("tex" "application/x-tex" "TeX Source")
  444. ("texi" "application/x-texinfo" "Texinfo")
  445. ("texinfo" "application/x-texinfo" "Texinfo")
  446. ("tga" "image/targa" "Targa/Truevision Image File")
  447. ("tgz" "application/x-gzip" "UNIX GTar Arvhive")
  448. ("tif" "image/tiff" "TIFF - Tag Image File Format")
  449. ("tiff" "image/tiff" "TIFF - Tagged Image File Format")
  450. ("tlk" "application/x-tlk" " ")
  451. ("tmv" "application/x-Parable-Thing" "Template (TextMaker)")
  452. ("toc" "application/vnd.framemaker" "FrameMaker TOC")
  453. ("tr" "application/x-troff" "Troff")
  454. ("trm" "application/x-msterminal" "MS terminal")
  455. ("tsi" "audio/tsplayer" " ")
  456. ("tsp" "application/dsptype" "Windows Telephony Service Provider")
  457. ("tsv" "text/tab-separated-values" "Tab Separated Values")
  458. ("txt" "text/plain" "Plain Text")
  459. ("uin" "application/x-icq" "ICQ 2001+ Saved ICQ Contact Information ")
  460. ("url" "application/x-url"
  461. "wwwserver/redirection application/internet-shortcut "
  462. "Uniform resource Locator (Internet Address)")
  463. ("ustar" "application/x-ustar" "IEEE Std1003.2 (``POSIX'') Tar")
  464. ("v5d" "application/vis5d" "5-D data set visualization")
  465. ("vbd" "application/activexdocument" "ActiveX file")
  466. ("vcs" "text/x-vcalendar"
  467. "Personal Data Interchange (PDI) Calendar entry - Outlook")
  468. ("vcd" "application/x-cdlink" "VirtualDrive CD Image File ")
  469. ("vcf" "text/x-vcard" "vCard (Business Card)")
  470. ("vdo" "video/vdo" "VDOLive Script Video image (Story Board)")
  471. ("vgm" "video/x-videogram" " ")
  472. ("vgp" "video/x-videogram-plugin" " ")
  473. ("vgx" "video/x-videogram" " ")
  474. ("viv" "video/vnd.vivo" "VivoActive Player Video file")
  475. ("vivo" "video/vnd.vivo" " ")
  476. ("vmd" "application/vocaltec-media-desc" " ")
  477. ("vmf" "application/vocaltec-media-file"
  478. "Font characteristics (Ventura Publisher)")
  479. ("vob" "video/dvd" "DVD Video Movie File")
  480. ("vox" "audio/voxware" "Vox Audio")
  481. ("vqe" "audio/x-twinvq-plugin" "Yamaha Sound-VQ Locator file")
  482. ("vqf" "audio/x-twinvq" "Yamaha Sound-VQ file")
  483. ("vql" "audio/x-twinvq" "Yamaha Sound-VQ Locator file")
  484. ("vrml" "model/vrml" " ")
  485. ("vrt" "x-world/x-vrt" " ")
  486. ("vts" "workbook/formulaone"
  487. "Forumle One - A Java Spread sheet and report generator from ")
  488. ("waf" "plugin/wanimate"
  489. "Mayim's WAF Compiler file for interactive 3D with Walkabout browser plug-in")
  490. ("wan" "plugin/wanimate" " ")
  491. ("wav" "audio/x-wav" "Windows Audio File WAVE format")
  492. ("wax" "audio/x-ms-wax" "Windows Media Audio Redirector to WMA file.")
  493. ("wbmp" "image/vnd.wap.wbmp"
  494. "Wireless Bitmap File Format - Mobil phones")
  495. ("wi" "image/wavelet" " ")
  496. ("wid" "application/x-DemoShield" "Width table (Ventura Publisher)")
  497. ("wis" "application/x-InstallShield" " ")
  498. ("wks" "application/x-msworks" "MS Works or Lotus 1-2-3 Worksheets")
  499. ("wlt" "application/x-mswallet" "eWallet file")
  500. ("wm" "video/x-ms-wm" " ")
  501. ("wma" "audio/x-ms-wma" "Windows Media Audio. Stored in ASF.")
  502. ("wmf" "image/x-wmf" "Windows MetaFile vector graphics")
  503. ("wml" "text/vnd.wap.wml" "Wireless Markup Language File")
  504. ("wmv" "video/x-ms-wmv" "Windows Media Video (Stored in ASF format)")
  505. ("wp" "application/wordperfect" "WordPerfect")
  506. ("wpc" "application/wpc"
  507. "Text-format converters used 1990-1997 by MS Word and Write")
  508. ("wpc" "application/pcms_wp" "WordPerfect Character Mapping File ")
  509. ("wpd," "application/wordperfect5.1" "Document (WordPerfect)")
  510. ("wps" "application/vnd.ms-works" "MS Works ")
  511. ("wri" "application/x-mswrite" "Write format (MS Windows)")
  512. ("wrl" "model/vrml" "Plain Text VRML File ")
  513. ("wrz" "x-world/x-vrml" " ")
  514. ("wtx" "audio/x-wtx" " ")
  515. ("wvx" "video/x-ms-wvx" " ")
  516. ("xbm" "image/x-xbitmap" "X Bitmaps")
  517. ("xdr" "video/x-videogram" " ")
  518. ("xla" "application/vnd.ms-excel" "MS Excel (Add in)")
  519. ("xlc" "application/vnd.ms-excel" "MS Excel (Chart)")
  520. ("xlm" "application/vnd.ms-excel" "MS Excel")
  521. ("xls" "application/vnd.ms-excel" "MS Excel")
  522. ("xlt" "application/vnd.ms-excel" "MS Excel (template)")
  523. ("xlw" "application/vnd.ms-excel" "MS Excel (workbook)")
  524. ("xml" "text/xml" "Extensible Markup Language")
  525. ("xpm" "image/x-xpixmap" "X Pixmap format")
  526. ("xsb" "application/x-xsb" "Superbook")
  527. ("xwd" "image/x-xwindowdump" "X Window Dump (xwd)")
  528. ("xyz" "chemical/x-pdb" "ASCII RPG Maker Graphic Format")
  529. ("zip" "application/zip"
  530. "Compressed file archive created by PKZIP (pkz204g.exe)")
  531. ("zpa" "application/pcphoto" " ")))
  532. (defvar *mime-types* (make-hash-table
  533. :test #'equal
  534. :size (length *mime-type-descriptions*)))
  535. ;;--- Initialize File extension/Mime Type hash table
  536. (dolist (type-lst *mime-type-descriptions*)
  537. (setf (gethash (first type-lst) *mime-types*) (second type-lst))))
  538. (defun lookup-mime-type (file-name
  539. &optional (default "application/octet-stream"))
  540. "Extract mime type based on file-extension"
  541. (let ((pos-ext (position #\. file-name :test #'char= :from-end t)))
  542. (when (and pos-ext
  543. (< (1+ pos-ext) (length file-name)))
  544. (or (gethash (subseq file-name (1+ pos-ext)) *mime-types*)
  545. default))))