[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-dev
Subject:    [jira] Updated: (MIME4J-37) Wrong implementation of
From:       "Stefano Bagnara (JIRA)" <server-dev () james ! apache ! org>
Date:       2008-02-24 22:13:14
Message-ID: 974329941.1203891194271.JavaMail.jira () brutus
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/MIME4J-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Stefano Bagnara updated MIME4J-37:
----------------------------------

    Affects Version/s: 0.4
                       0.3

This should be both against the 0.3 release and current trunk.

> 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
> 
> 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic