summaryrefslogtreecommitdiff
path: root/Mailman/Archiver/HyperArch.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Archiver/HyperArch.py')
-rw-r--r--Mailman/Archiver/HyperArch.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py
index ace44e228..a239e2fa3 100644
--- a/Mailman/Archiver/HyperArch.py
+++ b/Mailman/Archiver/HyperArch.py
@@ -216,9 +216,12 @@ class Article(pipermail.Article):
if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
self.email = re.sub('@', ' at ', self.email)
- # snag the content-type
- self.ctype = message.getheader('Content-Type') or "text/plain"
- self.cenc = message.getheader('Content-Transfer-Encoding')
+ # Snag the content-* headers. RFC 1521 states that their values are
+ # case insensitive.
+ ctype = message.getheader('Content-Type') or "text/plain"
+ cenc = message.getheader('Content-Transfer-Encoding')
+ self.ctype = string.lower(ctype)
+ self.cenc = string.lower(cenc)
self.decoded = {}
mo = rx_charset.search(self.ctype)
if mo: