From 584aa9c3d648067a0dd756cf561352b02d10ecc3 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Wed, 11 Jun 2008 15:48:16 -0700 Subject: Fixed a problem in Decorate.py that could result in a multipart message with no part headers for the original body part (1991348). --- Mailman/Handlers/Decorate.py | 8 +++++++- NEWS | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py index 65037fbb..64d569db 100644 --- a/Mailman/Handlers/Decorate.py +++ b/Mailman/Handlers/Decorate.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -159,9 +159,11 @@ def process(mlist, msg, msgdata): # basis of the interior, wrapped Message. inner = Message() # Which headers to copy? Let's just do the Content-* headers + copied = False for h, v in msg.items(): if h.lower().startswith('content-'): inner[h] = v + copied = True inner.set_payload(msg.get_payload()) # For completeness inner.set_unixfrom(msg.get_unixfrom()) @@ -171,6 +173,10 @@ def process(mlist, msg, msgdata): # get_content_charset isn't. However, do make sure there is a default # content-type, even if the original message was not MIME. inner.set_default_type(msg.get_default_type()) + if not copied: + inner['Content-Type'] = inner.get_content_type() + if msg['mime-version'] == None: + msg['MIME-Version'] = '1.0' # BAW: HACK ALERT. if hasattr(msg, '__version__'): inner.__version__ = msg.__version__ diff --git a/NEWS b/NEWS index fb8a47f6..926ae97e 100644 --- a/NEWS +++ b/NEWS @@ -58,6 +58,9 @@ Here is a history of user visible changes to Mailman. - Changed some non-ascii characters in templates/de/*.html to HTML entities. + - Fixed a problem in Decorate.py that could result in a multipart + message with no part headers for the original body part (1991348). + Miscellaneous - Brad Knowles' mailman daily status report script updated to 0.0.18. -- cgit v1.2.3