Message1051
Logged In: YES
user_id=469548
I've implemented this while refactoring the code extensively:
- I've extracted the extract_content method from handle_message.
- I've moved the get_part_data_decoded and extract_content
methods to the Message class.
- I've renamed the get_part_data_decoded to getbody and
getPart to getpart to bring them in line with the rest of
rfc822 and mimetools.
- I've extracted the getparts, getname and as_attachment
methods from extract_content.
I've also added a bunch of tests to test_multipart and made
up a new format easily describing messages without having to
type them out all the time.
A problem with my approach is that it handles all
non-text/plain parts as attachments, thus we need to ignore
some content types (e.g. application/pgp-signature). I can't
think of any other examples, but I would like to know about
them.
I'm attaching this implementation as a (rather extensive)
patch instead of checking it in, because it breaks backward
compatibility a bit (renaming getPart and moving
get_part_data_decoded).
Also, I'm losing my internet connection on my workstation
for an indefinite time because of moving. As such, I can't
take responsibility for maintaining this code, though I'm
confident it's correct. |
|
Date |
User |
Action |
Args |
2009-02-03 14:20:32 | admin | link | issue841241 messages |
2009-02-03 14:20:32 | admin | create | |
|