[Python-checkins] python/dist/src/Lib/email Parser.py, 1.20, 1.20.12.1 (original) (raw)
bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Thu May 13 19:12:36 EDT 2004
- Previous message: [Python-checkins] python/dist/src/Lib/email __init__.py, 1.29.10.1, 1.29.10.2
- Next message: [Python-checkins] python/dist/src/Lib/email Parser.py, 1.20, 1.20.12.1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6339
Modified Files: Tag: release23-maint Parser.py Log Message: _parsebody(): Do not create subparts unless the container has a main type of 'multipart' and the boundary is defined. This fixes SF bug # 846938, and several recent email-sig bugs where something like a text/html message also had a boundary parameter. This would later crash the Generator, which only consulted the Content-Type to decide how to generate the message (and it would expect just a string, but find a list there instead).
Index: Parser.py
RCS file: /cvsroot/python/python/dist/src/Lib/email/Parser.py,v retrieving revision 1.20 retrieving revision 1.20.12.1 diff -C2 -d -r1.20 -r1.20.12.1 *** Parser.py 6 Mar 2003 05:25:35 -0000 1.20 --- Parser.py 13 May 2004 23:12:33 -0000 1.20.12.1
*** 1,4 **** ! # Copyright (C) 2001,2002 Python Software Foundation ! # Author: barry at zope.com (Barry Warsaw)
"""A parser of RFC 2822 and MIME email messages. --- 1,4 ---- ! # Copyright (C) 2001-2004 Python Software Foundation ! # Author: barry at python.org (Barry Warsaw)
"""A parser of RFC 2822 and MIME email messages.
*** 146,154 **** boundary = container.get_boundary() isdigest = (container.get_content_type() == 'multipart/digest') ! # If there's a boundary, split the payload text into its constituent ! # parts and parse each separately. Otherwise, just parse the rest of ! # the body as a single message. Note: any exceptions raised in the ! # recursive parse need to have their line numbers coerced. ! if boundary: preamble = epilogue = None # Split into subparts. The first boundary we're looking for won't --- 146,155 ---- boundary = container.get_boundary() isdigest = (container.get_content_type() == 'multipart/digest') ! # If there's a boundary and the message has a main type of ! # 'multipart', split the payload text into its constituent parts and ! # parse each separately. Otherwise, just parse the rest of the body ! # as a single message. Note: any exceptions raised in the recursive ! # parse need to have their line numbers coerced. ! if container.get_content_maintype() == 'multipart' and boundary: preamble = epilogue = None # Split into subparts. The first boundary we're looking for won't
- Previous message: [Python-checkins] python/dist/src/Lib/email __init__.py, 1.29.10.1, 1.29.10.2
- Next message: [Python-checkins] python/dist/src/Lib/email Parser.py, 1.20, 1.20.12.1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]