[Python-checkins] python/dist/src/Lib/email Generator.py,1.13,1.14
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Tue, 20 Aug 2002 07:47:33 -0700
Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv24004/email
Modified Files:
Generator.py
Log Message:
_dispatch(): Use get_content_maintype() and get_content_subtype() to
get the MIME main and sub types, instead of getting the whole ctype
and splitting it here. The two more specific methods now correctly
implement RFC 2045, section 5.2.
Index: Generator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Generator.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Generator.py 19 Jul 2002 22:21:02 -0000 1.13
--- Generator.py 20 Aug 2002 14:47:30 -0000 1.14
***************
*** 124,130 ****
# full MIME type, then dispatch to self._handle_<maintype>(). If
# that's missing too, then dispatch to self._writeBody().
! ctype = msg.get_content_type()
! # We do have a Content-Type: header.
! main, sub = ctype.split('/')
specific = UNDERSCORE.join((main, sub)).replace('-', '_')
meth = getattr(self, '_handle_' + specific, None)
--- 124,129 ----
# full MIME type, then dispatch to self._handle_<maintype>(). If
# that's missing too, then dispatch to self._writeBody().
! main = msg.get_content_maintype()
! sub = msg.get_content_subtype()
specific = UNDERSCORE.join((main, sub)).replace('-', '_')
meth = getattr(self, '_handle_' + specific, None)