New submission from Jon Nelson <jnel...@users.sourceforge.net>: import os try: from email.mime.multipart import MIMEMultipart except ImportError: from email.MIMEMultipart import MIMEMultipart
m = MIMEMultipart('form-data') print m.items() m.as_string() print m.items() print out: [('Content-Type', 'multipart/form-data'), ('MIME-Version', '1.0')] [('Content-Type', 'multipart/form-data; boundary="===============0836597002796039051=="'), ('MIME-Version', '1.0')] The latter is correct, the former is not - it is missing the boundary! items() should behave the same regardless of whether or not as_string() has been called. Confirmed in 2.4 and 2.6 ---------- components: Library (Lib) messages: 93935 nosy: jnelson severity: normal status: open title: email: msg.items() returns different values before and after msg.as_string() type: behavior versions: Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7119> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com