aboutsummaryrefslogtreecommitdiffstats
path: root/xml/be-xml-to-mbox
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2009-06-26 16:16:10 -0400
committerChris Ball <cjb@laptop.org>2009-06-26 16:16:10 -0400
commitacf7b0cc492142ef0bbf1c04aed652a53caf7fe1 (patch)
tree83caecf530df36cc9f88bd94373b0fea0129b979 /xml/be-xml-to-mbox
parent34b2884112e3c3ca0cc0ac83df68c66f6b2729c4 (diff)
parent97aeb18b20f901950da0355471fdc17055f3f4a8 (diff)
downloadbugseverywhere-acf7b0cc492142ef0bbf1c04aed652a53caf7fe1.tar.gz
Merge with W. Trevor King's tree, which allows attaching binary files to bugs.
Diffstat (limited to 'xml/be-xml-to-mbox')
-rwxr-xr-xxml/be-xml-to-mbox11
1 files changed, 7 insertions, 4 deletions
diff --git a/xml/be-xml-to-mbox b/xml/be-xml-to-mbox
index b0a4cba..e5fec3b 100755
--- a/xml/be-xml-to-mbox
+++ b/xml/be-xml-to-mbox
@@ -116,14 +116,17 @@ class Comment (LimitedAttrDict):
print "Message-ID: <%s@%s>" % (self["uuid"], DEFAULT_DOMAIN)
print "Date: %s" % self["date"]
print "From: %s" % self["from"]
- print "Content-Type: %s; charset=%s" % (self["content-type"], DEFAULT_ENCODING)
- print "Content-Transfer-Encoding: 8bit"
print "Subject: %s: %s" % (self["short-name"], bug["summary"])
if "in-reply-to" not in self.keys():
self["in-reply-to"] = bug["uuid"]
print "In-Reply-To: <%s@%s>" % (self["in-reply-to"], DEFAULT_DOMAIN)
- print ""
- print self["body"]
+ if self["content-type"].startswith("text/"):
+ print "Content-Transfer-Encoding: 8bit"
+ print "Content-Type: %s; charset=%s" % (self["content-type"], DEFAULT_ENCODING)
+ print ""
+ print self["body"]
+ else: # content type and transfer encoding already in XML MIME output
+ print self["body"]
print ""
class BE_list_handler (ContentHandler):