[ python-Bugs-1060941 ] email.Parser does not recognize attachment

SourceForge.net noreply at sourceforge.net
Fri Nov 5 14:30:56 CET 2004


Bugs item #1060941, was opened at 2004-11-05 14:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1060941&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin Muenstermann (mamuema)
Assigned to: Nobody/Anonymous (nobody)
Summary: email.Parser does not recognize attachment

Initial Comment:
Python Version: 2.3.4
I received an email with attachment, whose sender chose
a boundary starting with a whitespace (' '). 
Problem: email.Parser does not recognize the
attachment, msg.is_multipart() returns False,
msg.walk() returns the whole mail as one part.

The problem seems to be caused by the fact that the
implementation of msg.get_boundary() calls strip().

Problem can be reproduced with the attached script.
Output for me is:
msg.get_content_maintype(): multipart
msg.is_multipart():         False
msg.get_boundary():         'simple boundary'
msg.get_param('boundary'):  ' simple boundary'

I don't know if this boundary is legal according to the
RFCs, but maybe we should handle it anyway?

Regards,
 Martin


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1060941&group_id=5470


More information about the Python-bugs-list mailing list