root/trunk/thirdparty/cl-smtp/mime-types.lisp

Revision 2782, 29.8 kB (checked in by hans, 5 months ago)

update cl-smtp from cvs

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