[Python-checkins] CVS: python/dist/src/Lib mimetypes.py,1.18,1.19

Martin v. L?wis loewis@users.sourceforge.net
Fri, 07 Sep 2001 09:49:14 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv31727

Modified Files:
	mimetypes.py 
Log Message:
Patch #438790: Add additional mappings.
Also remove mappings that are not registered with IANA, and not extensions.


Index: mimetypes.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimetypes.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** mimetypes.py	2001/08/18 04:06:54	1.18
--- mimetypes.py	2001/09/07 16:49:12	1.19
***************
*** 221,224 ****
--- 221,227 ----
      }
  
+ # Before adding new types, make sure they are either registered with IANA, at
+ # http://www.isi.edu/in-notes/iana/assignments/media-types
+ # or extensions, i.e. using the x- prefix
  types_map = {
      '.a': 'application/octet-stream',
***************
*** 255,260 ****
      '.man': 'application/x-troff-man',
      '.me': 'application/x-troff-me',
-     '.mid': 'audio/midi',
-     '.midi': 'audio/midi',
      '.mif': 'application/x-mif',
      '.mov': 'video/quicktime',
--- 258,261 ----
***************
*** 285,289 ****
      '.rdf': 'application/xml',
      '.roff': 'application/x-troff',
-     '.rtf': 'application/rtf',
      '.rtx': 'text/richtext',
      '.sgm': 'text/x-sgml',
--- 286,289 ----
***************
*** 316,319 ****
--- 316,352 ----
      '.xwd': 'image/x-xwindowdump',
      '.zip': 'application/zip',
+     '.mp3': 'audio/mpeg',
+     '.ra': 'audio/x-pn-realaudio',
+     '.pdf': 'application/pdf',
+     '.c': 'text/plain',
+     '.bat': 'text/plain',
+     '.h': 'text/plain',
+     '.pl': 'text/plain',
+     '.ksh': 'text/plain',
+     '.ram': 'application/x-pn-realaudio',
+     '.cdf': 'application/x-cdf',
+     '.doc': 'application/msword',
+     '.dot': 'application/msword',
+     '.wiz': 'application/msword',
+     '.xlb': 'application/vnd.ms-excel',
+     '.xls': 'application/vnd.ms-excel',
+     '.ppa': 'application/vnd.ms-powerpoint',
+     '.ppt': 'application/vnd.ms-powerpoint',
+     '.pps': 'application/vnd.ms-powerpoint',
+     '.pot': 'application/vnd.ms-powerpoint',
+     '.pwz': 'application/vnd.ms-powerpoint',
+     '.eml':   'message/rfc822',
+     '.nws':   'message/rfc822',
+     '.mht':   'message/rfc822',
+     '.mhtml': 'message/rfc822',
+     '.css': 'text/css',
+     '.p7c': 'application/pkcs7-mime',
+     '.p12': 'application/x-pkcs12',
+     '.pfx': 'application/x-pkcs12',
+     '.js':  'application/x-javascript',
+     '.m1v': 'video/mpeg',
+     '.mpa': 'video/mpeg',
+     '.vcf': 'text/x-vcard',
+     '.xml': 'text/xml',
      }