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/07/22 21:11:31 UTC
[jira] Commented: (MIME4J-65) Message.writeTo for an rfc822 part
ignoring a "base64" encoding
[ https://issues.apache.org/jira/browse/MIME4J-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615743#action_12615743 ]
Stefano Bagnara commented on MIME4J-65:
---------------------------------------
I believe there is a design issue in the current encoding/decoding behaviour.
I found a solution that fixes this issue, but it is not good because I use a temporary ByteArrayOutputStream to encode/decode output streams. The correct solution would be to encapsulate the outputstream in a Base64EncoderOutputStream, QuotedPrintableEncoderOutputStream, QuotedPrintableTextEncoderOutputStream and keep using the body.writeTo method.
Unfortunately the encoder utils are now utility and works on buffer instead of streams (I had no time to check how feasible is to convert them to stream).
Encoding/Decoding from/to Base64/QuotedPrintable is a concept that should be considered at the Message level because an Header define how to deal with a body. It does not make sense to have the body implementations (TempFileTextBody, TempFileBinaryBody to handle encoding/decoding, IMHO).
If otherwise we want to keep the encoding/decoding behaviour in the body implementations (BAD for me) then we have to correctly deal with rfc822 Message body encoding somehow.
> Message.writeTo for an rfc822 part ignoring a "base64" encoding
> ---------------------------------------------------------------
>
> Key: MIME4J-65
> URL: https://issues.apache.org/jira/browse/MIME4J-65
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.4
> Reporter: Stefano Bagnara
> Fix For: 0.4, 0.5
>
>
> the writeTo method for a Content-Transfer-Encoding: base64 and Content-Type: message/rfc822 part writes the message unencoded.
> I would expect it to be encoded in a base64 stream. See MIME4J-64 for an useful test.
--
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