• Barry Warsaw's avatar
    get_content_type(), get_content_maintype(), get_content_subtype(): RFC · f36d804b
    Barry Warsaw authored
    2045, section 5.2 states that if the Content-Type: header is
    syntactically invalid, the default type should be text/plain.
    Implement minimal sanity checking of the header -- it must have
    exactly one slash in it.  This closes SF patch #597593 by Skip, but in
    a different way.
    
    Note that these methods used to raise ValueError for invalid ctypes,
    but now they won't.
    f36d804b
Message.py 26.5 KB