Marko Lalic added the comment:

Thank you for your reply.

Unfortunately, I have a use case where message_from_bytes has a pretty great 
disadvantage. I have to parse the received message and then forward it 
completely unchanged, apart from possibly adding a few new headers. The problem 
with message_from_bytes is that it changes the Content-Transfer-Encoding header 
to base64 (and consequently base64 encodes the content).

Do you possibly have a suggestion how to currently go about solving this 
problem? A possible solution I can spot from your answer is to check the 
Content-Transfer-Encoding before getting the payload and use the version 
without decode=True when it is 8bit. Maybe there is something more elegant?

Thank you in advance.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18271>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to