james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin (JIRA)" <server-...@james.apache.org>
Subject [jira] Commented: (MIME4J-37) Wrong implementation of TempFileBinaryBody.writeTo
Date Sun, 25 May 2008 18:53:55 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599706#action_12599706
] 

Robert Burrell Donkin commented on MIME4J-37:
---------------------------------------------

Committed fix for binary Base64 encoded. TODO binary quoted-printable.

> 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
>             Fix For: 0.4
>
>
> 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


Mime
View raw message