From 254942e602efc39ab99d4f11448b52d3bc5d7810 Mon Sep 17 00:00:00 2001 From: Jeremy Schlatter Date: Tue, 2 Dec 2014 16:08:29 -0800 Subject: [PATCH] Label broken MIME attachments as ContentType: application/octet-stream rather than ContentType: text/plain --- flanker/mime/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flanker/mime/create.py b/flanker/mime/create.py index 816826d..7b8cefa 100644 --- a/flanker/mime/create.py +++ b/flanker/mime/create.py @@ -69,7 +69,7 @@ def attachment(content_type, body, filename=None, message.headers['Content-Disposition'] = WithParams(disposition) return message except DecodingError: - content_type = ContentType('text', 'plain') + content_type = ContentType('application', 'octet-stream') return binary( content_type.main, content_type.sub, -- 2.43.0