From a00189b4efceefd99c2dc5b121b173fc438e982e Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 19 Apr 2010 03:56:54 +0000 Subject: [PATCH] Default to "text/plain" if no Content-Type header is present in email (thanks Hauke Duden) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4481 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 2 ++ doc/acknowledgements.txt | 1 + roundup/mailgw.py | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3be78b0..5173676 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,8 @@ Fixed: http://thread.gmane.org/gmane.comp.bug-tracking.roundup.user/10040 thanks to Hauke Duden for reporting these. - frontends/roundup.cgi got out of sync with the roundup.cgi.Client API +- Default to "text/plain" if no Content-Type header is present in email + (thanks Hauke Duden) 2010-02-23 1.5.0 diff --git a/doc/acknowledgements.txt b/doc/acknowledgements.txt index c7cdcc2..105bc62 100644 --- a/doc/acknowledgements.txt +++ b/doc/acknowledgements.txt @@ -29,6 +29,7 @@ Bruno Damour, Bradley Dean, Toby Dickenson, Paul F. Dubois, +Hauke Duden, Eric Earnst, Peter Eisentraut, Andrew Eland, diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 5055756..61f3cdf 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -246,6 +246,10 @@ class Message(mimetools.Message): def getheader(self, name, default=None): hdr = mimetools.Message.getheader(self, name, default) + # TODO are there any other False values possible? + # TODO if not hdr: return hdr + if hdr is None: + return None if not hdr: return '' if hdr: -- 2.30.2