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 "Robert Burrell Donkin (JIRA)" <se...@james.apache.org> on 2008/05/25 15:57:55 UTC
[jira] Assigned: (MIME4J-37) Wrong implementation of
TempFileBinaryBody.writeTo
[ https://issues.apache.org/jira/browse/MIME4J-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin reassigned MIME4J-37:
-------------------------------------------
Assignee: Robert Burrell Donkin
> Wrong implementation of TempFileBinaryBody.writeTo
> --------------------------------------------------
>
> Key: MIME4J-37
> URL: https://issues.apache.org/jira/browse/MIME4J-37
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.3, 0.4
> Reporter: Aljoscha Rittner
> Assignee: Robert Burrell Donkin
>
> Message delegates writeTo to all Message-Entites.
> With this design it's impossible to write a message in a valid rfc822 format.
> With binary content, the Multipart.writeTo writes a preamble in ascii, writes the boundary in ascii and the epilogue in ascii, but the binary content is complete decoded.
> writer.write(getPreamble() + "\r\n");
> for (int i = 0; i < bodyParts.size(); i++) {
> writer.write(boundary + "\r\n");
> ((BodyPart) bodyParts.get(i)).writeTo(out);
> }
> writer.write(getEpilogue() + "\r\n");
> writer.write(boundary + "--" + "\r\n");
> bodyPart delegates the writeTo to TempFileBinaryBody.writeTo:
> IOUtils.copy(getInputStream(),out);
> with this implementation I get mixed ascii/binary code in one outputstream. It's impossible to read the message.
> So I can't see any usecase to delegate the writeTo from Message to all his parts, or(?) the writeTo - Method in TempFileBinaryBody is wrong.
> The Documentation from Body.writeTo is:
> "Writes this body to the given stream in MIME message format."
> And in TempFileBinaryBody.writeTo:
> @see org.apache.james.mime4j.message.Body#writeTo(java.io.OutputStream)
> But TempFileBinaryBody.writeTo does not write the content in MIME message format.
> best regards,
> josh.
--
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