Log Message: |
Message.writeTo() prematurely closed output stream if transfer encoding is BASE64 (MIME4J-79)
Patch kindly provided by Markus Wiederkehr and Oleg Kalnichevski.
The only change from the proposed patch is the "closed = true" when "len < 0" (in Base64OutputStream) because len == -1 is the way we are notified of a stream end and writing more data would result in corrupted output, so it seems safer to consider the stream closed after that call.
|