From 1d95cf991130df7f4d277ed2f840a397d512146d Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Thu, 11 Oct 2018 01:22:42 +0200 Subject: Add test for #1301 This adds a test for detecting a malformed content-transfer-encoding (trailing semi-colon). It also changes the raised exception to the more appropriate ValueError. --- tests/static/mail/malformed-header-CTE.eml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/static/mail/malformed-header-CTE.eml (limited to 'tests/static') diff --git a/tests/static/mail/malformed-header-CTE.eml b/tests/static/mail/malformed-header-CTE.eml new file mode 100644 index 00000000..1c3895c2 --- /dev/null +++ b/tests/static/mail/malformed-header-CTE.eml @@ -0,0 +1,10 @@ +Subject: malformed Content-Transfer-Encoding +To: lucc@github +From: test@alot +MIME-Version: 1.0; +Content-Type: text/plain; charset=iso-8859-1; +Content-Transfer-Encoding: 7bit; + +This message contains a malformed header value for the "Content-Transfer-Encoding": +It should be "7bit", not "7bit;". +issue #1301 -- cgit v1.2.3