• sikeda's avatar
    [dev] Refactoring Message module: Preventing breakage of message contents by re-encoding MIME. · 4a2d6254
    sikeda authored
    - The {msg} item of Message object does no longer represent actual content: Original string representation will be kept as far as possible.
    - {msg_as_string} was splitted to {_head} (MIME::Head entity) and {_body} (body as string).  Accessors are head(), header_as_string(), body_as_string() and as_string().
    - For now don't access to {msg}, {_head} and {_body} items directly: Use as_entity() and methods above.
    - add_header(), delete_header() or replace_header() should be used to modify {_head}.  get_header() may be used to get header fields (only at the top level of structure).
    - {orig_msg} item was replaced by {orig_msg_as_string} to prevent reencoding, too.
    - To get message ID, sender and so on, use items {message_id}, {sender} and so on of objects, not using get_header() etc.
    - See also POD.
    ToDo: Some components (probably bulk.pl etc.) still reencode contents.
    git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@11209 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce