[dev] Revamp of MIME_Structure/IMP mime objects
Michael M Slusarz
slusarz@bigworm.colorado.edu
Wed, 1 May 2002 01:53:04 -0600
Hoo boy, here we go.
http://bigworm.colorado.edu/imp-patches/pgp-diffs/rfc2045.diff.txt
As Chuck suggested/remarked a bit ago, MIME_Structure now returns a
MIME_Message object. In turn, this MIME_Message object uses MIME_Part
objects to store each of the MIME parts. It would make much more sense to
look at an example...
Here is the return from MIME_Structure using the old method:
http://bigworm.colorado.edu/imp-patches/pgp-diffs/rfc2045_b.txt
And here is the return from the new class:
http://bigworm.colorado.edu/imp-patches/pgp-diffs/rfc2045_a.txt
To facilitate this, there have also been mucho changes to MIME_Part and
MIME_Message. MIME_Message is now a general all-purpose module to use for
either constructing or manipulating a MIME message. MIME_Part has been
greatly improved also - as with MIME_Message it is now fit for use for both
creating new MIME parts and manipulating existing MIME parts.
All things relating to this move have (hopefully) been changed in IMP
also. Once again, I tested using the MIME torture test message and it
renders perfectly (it actually renders better than the current IMP since it
filters out an alternative part in one of the Parts that the current IMP
mistakenly displays).
I didn't set out to change the world :) but the old system did not appear
workable for the PGP stuff that needs to be done. Namely, IMAP will not
return MIME headers for individual MIME parts :( imap_body() strips all
this information away. However, when verifying signatures, all of these
MIME headers MUST be displayed (RFC 2015). The only way I can figure to do
this is to download the entire MIME Part and strip off the boundary
elements. However, with the current system there is no way to determine
what these boundary elements are. The new framework provides the boundary
elements for each and every MIME part so this should help immensely.
let me know if you have any questions.
michael
______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder