Some suggested changes to gwlib MIME module
Paul Bagyenda <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Mbuni MMSC/MMS VAS Gateway makes heavy use of Kannel's GWLIB,
which has resulted partly in some patches to Kannel from our side, to
take care of missing stuff (or stuff we thought looked faulty). Many
of these are now merged into CVS.
One area we've been talking about for a while now is the Kannel
MIME module. With Stipe's help we've managed to narrow down our
issues to one problem: The fact that the layout of the MIMEEntity
structure is exposed in the header file.
The potential problems are subtle. In our case we tripped on the
following problem: If you have a multi-part MIME object that you have
constructed manually (as is done for instance in the Mbuni code that
converts an MMS into an MM7/SOAP message), and you want to extract
its header (mime_entity_headers()) and then its body (mime_entity_body
()), you end up with a wrong or missing boundary element for the
content type in the header. The result is that header/body can no
longer be combined and parsed!
In discussions with Stipe, it looks like whichever way you cut it,
this kind of problem would arise, as long as users can muck around
with the internal structure of a MIMEEntity.
Solution: Hide it and add additional helper functions for
manipulating the structure. Suggested solution attached as a patch
against CVS.
Thanks
Paul.

-----------------------------------------------
Trek the Rwenzori's. Or just see them online - http://www.rwenzori.com/