• Barry Warsaw's avatar
    Import _isstring() from the compatibility layer. · da6a5573
    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).
    da6a5573
Generator.py 13.6 KB