]> khamidou — GitHub mirrors - flanker.git/commit
Fix handling for broken .eml messages.
authorJeremy Schlatter <jeremy.schlatter@gmail.com>
Thu, 4 Dec 2014 00:54:06 +0000 (16:54 -0800)
committerJeremy Schlatter <jeremy.schlatter@gmail.com>
Mon, 27 Jul 2015 17:59:18 +0000 (10:59 -0700)
commitfafdf4f949e17e0317789cd0978328da7d306aaf
treeecf563b5514b6a1d55afd9554bdf7560aac54dfa
parent0de576661c5b41d9719cc8c7abdc2bae94731738
Fix handling for broken .eml messages.

I didn't test this well enough yesterday. It turns out that the
attachment was getting created, but its ContentType was overwritten to
message/rfc822. This caused problems elsewhere because the the
attachment we created did not have the structure expected for
message/rfc822.

The fix: Don't let Body override our ContentType declaration.
flanker/mime/create.py
flanker/mime/message/part.py
tests/__init__.py
tests/fixtures/messages/false-multipart.eml [new file with mode: 0644]
tests/mime/message/create_test.py