_encode_chunks(), encode(): Don't modify self._chunks.  As Ben says:

    Also, it fixes a really egregious error in Header.encode() (really
    in Header._encode_chunks()) that could cause a header to grow and
    grow each time encode() was called if output_codec was different
    from input_codec.

Also, fix a typo.
1 file changed