• Barry Warsaw's avatar
    __init__(): Fix an invariant, that the charset item in a chunk tuple · 5e3bcff6
    Barry Warsaw authored
    must be a Charset instance, not a string.  The bug here was that
    self._charset wasn't being converted to a Charset instance so later
    .append() calls which used the default charset would break.
    
    _split(): If the charset of the chunk is '8bit', return the chunk
    unchanged.  We can't safely split it, so this is the avenue of least
    harm.
    5e3bcff6
Header.py 17.1 KB