[issue5277] email message.get_params() and related methods sometimes fail.

Ryan Coyner report at bugs.python.org
Thu Mar 4 08:21:46 CET 2010


Ryan Coyner <rcoyner at gmail.com> added the comment:

Okay, bug confirmed:

>>> m = email.message_from_string('Content-Disposition: inline; filename*0="foo \\"test"; filename*1="\\"bar"')
>>> m.get_filename()
'foo "test"; filename*1=""bar'


And here is the result with the patch applied:

>>> m = email.message_from_string('Content-Disposition: inline; filename*0="foo \\"test"; filename*1="\\"bar"')
>>> m.get_filename()
'foo "test"bar'


Attached a patch. Unit test included.

----------
nosy: +rcoyner
Added file: http://bugs.python.org/file16426/issue5277.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5277>
_______________________________________


More information about the Python-bugs-list mailing list