Alex Morega
2010-04-03 21:00:10 UTC
Hello,
I've been looking at the MIME parser class, adding tests and fixing some bugs. Here are some thoughts/ideas.
Taking inspiration from Python's email module, we could have three separate entities: a MIME parser, a MIME generator, and an in-memory representation of messages. The parser produces an event stream which can get turned into an in-memory message (with attachments sent directly to disk); the generator works in reverse.
I've noticed some other pars of the code that claim to work with MIME documents. Also, many classes that are not included in the LetterBox framework (but are in the repository anyway). Are they used anywhere?
Finally, the MIME parsing will need to be bullet-proof, since it handles non-trusted data. This means at least having well-defined error paths. Some fuzz testing would also be useful.
Cheers,
-- Alex
I've been looking at the MIME parser class, adding tests and fixing some bugs. Here are some thoughts/ideas.
Taking inspiration from Python's email module, we could have three separate entities: a MIME parser, a MIME generator, and an in-memory representation of messages. The parser produces an event stream which can get turned into an in-memory message (with attachments sent directly to disk); the generator works in reverse.
I've noticed some other pars of the code that claim to work with MIME documents. Also, many classes that are not included in the LetterBox framework (but are in the repository anyway). Are they used anywhere?
Finally, the MIME parsing will need to be bullet-proof, since it handles non-trusted data. This means at least having well-defined error paths. Some fuzz testing would also be useful.
Cheers,
-- Alex