Message91466
I am using an edge case of multipart/mixed and find that the
multipart/mix parser in the email package is broken. See attached
example. Similar code using cgi.FieldStorage (!) works fine.
The problem happens through the following combination of factors:
1. Content-Length given
2. Content-Transfer-Encoding: 8bit
3. Last two bytes of the part body are '\r\n'
In this case, the final '\n' is removed from the part body, leaving it a
byte short. Note that interior occurrences of '\r\n' work fine, as does
any other binary data -- it's only a trailing '\r\n' that breaks.
Note that technically perhaps the use of 8bit is invalid; but the same
problem happens when using binary instead.
The problem can be reproduced in Python 3.x using nearly the same demo
by change the cStringIO import to "import io". |
|
Date |
User |
Action |
Args |
2009-08-10 22:58:34 | gvanrossum | set | recipients:
+ gvanrossum |
2009-08-10 22:58:34 | gvanrossum | set | messageid: <1249945114.19.0.529736934099.issue6681@psf.upfronthosting.co.za> |
2009-08-10 22:58:32 | gvanrossum | link | issue6681 messages |
2009-08-10 22:58:32 | gvanrossum | create | |
|