[issue7143] get_payload(decode=True) eats last newline

Joaquin Cuenca Abela report at bugs.python.org
Wed Mar 3 12:22:58 CET 2010


Joaquin Cuenca Abela <e98cuenc at gmail.com> added the comment:

Hi,

RFC 2046, 5.1.1 refers to the CRLF that happens just before the boundary. It says nothing about an encoded CRLF.

>From Andreas example, if you have:

Content-Type: text/plain; name="test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="test.txt"

MTIzCg==
--------------040103020004000509010404--

You are correctly eating the CRLF that exists between MTIzCg== and --------------040103020004000509010404--, because it's part of the boundary.

You are also eating the CRLF that is inside the base64 encoded text, and I agree with Andreas that this is incorrect. Will you please consider reopening this bug?

----------
nosy: +Joaquin.Cuenca.Abela

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


More information about the Python-bugs-list mailing list