You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Stefano Bagnara (JIRA)" <se...@james.apache.org> on 2008/09/24 14:30:44 UTC
[jira] Resolved: (MIME4J-79) Message.writeTo() prematurely closes
output stream if transfer encoding is BASE64
[ https://issues.apache.org/jira/browse/MIME4J-79?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Bagnara resolved MIME4J-79.
-----------------------------------
Resolution: Fixed
Assignee: Stefano Bagnara
Patch applied.
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.
I also changed some really trivial code formatting things.
> 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
> Assignee: Stefano Bagnara
> Priority: Blocker
> Fix For: 0.5
>
> Attachments: Base64BugDemo.java, mime4j-base64.patch, mime4j-close-codec-ioex.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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org