aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Archiver/pipermail.py
diff options
context:
space:
mode:
authortkikuchi <>2005-12-17 05:11:44 +0000
committertkikuchi <>2005-12-17 05:11:44 +0000
commit75dee062afed5d1432820d897de3bcf3dc2e8238 (patch)
treec0cb18cab8ab2e89526fbefc04a5737d94a4bcf4 /Mailman/Archiver/pipermail.py
parent4fc195111db5d68eb97d259ed8bc67beae95302d (diff)
downloadmailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.tar.gz
mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.tar.xz
mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.zip
Fixes for email.set_payload() not distinguish parsed or virgin payload.
I've tested the example by Mark Sapiro: http://mail.python.org/pipermail/mailman-developers/2005-November/018395.html both with and without 'Content-Transfer-Encoding' but may need more test.
Diffstat (limited to '')
-rw-r--r--Mailman/Archiver/pipermail.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py
index fac7e5ed..f27e1101 100644
--- a/Mailman/Archiver/pipermail.py
+++ b/Mailman/Archiver/pipermail.py
@@ -217,7 +217,12 @@ class Article:
self.headers[i] = message[i]
# Read the message body
- s = StringIO(message.get_payload(decode=1)\
+ # Check Scrubber-munged paylaod
+ if message.get('x-mailman-scrubbed'):
+ decode = False
+ else:
+ decode = True
+ s = StringIO(message.get_payload(decode=decode)\
or message.as_string().split('\n\n',1)[1])
self.body = s.readlines()