MIME.Message fails to decode parts with empty/no headers
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3171
Reported by Mirar , Idonex Heavy Industries mirar@roxen.com
(All tested Pike versions from 0.6 up)
I have problem getting the "test test test" part out of the message by using the MIME.Message class.
The message is packed using Gnus and its mml thingie.
Mime.Message m=...;
m->body_parts[0]->getdata() == ""
m->body_parts[0]->encoded_data == ""
Inserting a dummy header after the boundary makes MIME.Message decode the mail correctly. Also note the double line feed to end the 0 lines of headers (correctly).
---snip---
From: Mirar <mirar@lysator.liu.se>
Date: 02 Jul 2002 09:38:36 +0200
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
--=-=-=
test test test
--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=foo
hej hopp
--=-=-=-- ---end snip---
Also see "MIME trouble" thread in the Pike mailing list.