• Barry Warsaw's avatar
    Fixing some RFC 2231 related issues as reported in the Spambayes · 6533fcb3
    Barry Warsaw authored
    project, and with assistance from Oleg Broytmann.  Specifically,
    
    get_param(), get_params(): Document that these methods may return
    parameter values that are either strings, or 3-tuples in the case of
    RFC 2231 encoded parameters.  The application should be prepared to
    deal with such return values.
    
    get_boundary(): Be prepared to deal with RFC 2231 encoded boundary
    parameters.  It makes little sense to have boundaries that are
    anything but ascii, so if we get back a 3-tuple from get_param() we
    will decode it into ascii and let any failures percolate up.
    
    get_content_charset(): New method which treats the charset parameter
    just like the boundary parameter in get_boundary().  Note that
    "get_charset()" was already taken to return the default Charset
    object.
    
    get_charsets(): Rewrite to use get_content_charset().
    6533fcb3
Message.py 28.8 KB