[
https://issues.apache.org/jira/browse/MIME4J-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634093#action_12634093
]
Stefano Bagnara commented on MIME4J-79:
---------------------------------------
My bad.. I fixed this issue in the old Base64OutputStream implementation and I
forgot about it when I changed the implementation. I thought "tests pass, so it
must be ok".. mea culpa I didn't wrote a unit test the first time I fixed it.
The patch proposed by Oleg seems fine; Markus hint about the IOException may be
appropriate but the class is for internal use ATM, and it should never happen
to call that methods when the stream is closed in mime4j, so we can improve
this even in a future release.
> Message.writeTo() prematurely closes output stream if transfer encoding is
> BASE64
> ---------------------------------------------------------------------------------
>
> Key: MIME4J-79
> URL: https://issues.apache.org/jira/browse/MIME4J-79
> Project: JAMES Mime4j
> Issue Type: Bug
> Affects Versions: 0.5
> Reporter: Markus Wiederkehr
> Priority: Blocker
> Fix For: 0.5
>
> Attachments: Base64BugDemo.java, mime4j-base64.patch,
> mime4j-close-codec.patch
>
>
> Entity.writeTo(OutputStream out, int mode) wraps the output stream in a
> Base64OutputStream if the transfer encoding is BASE64. Later the wrapper
> stream gets closed and (despite of a comment that says otherwise) the inner
> stream gets closed, too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]