• Barry Warsaw's avatar
    Import _isstring() from the compatibility layer. · b1c1de38
    Barry Warsaw authored
    _handle_text(): Use _isstring() for stringiness test.
    
    _handle_multipart(): Add a test before the ListType test, checking for
    stringiness of the payload.  String payloads for multitypes means a
    message with broken MIME chrome was parsed by a lax parser.  Instead
    of raising a BoundaryError in those cases, the entire body is assigned
    to the message payload (but since the content type is still
    multipart/*, the Generator needs to be updated too).
    b1c1de38
Generator.py 13.6 KB