james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wiederkehr <markus.wiederk...@gmail.com>
Subject Re: [mime4j] [PATCH] - Proposed patch to decode base64 messages with malformed Content-Transfer-Encoding headers
Date Wed, 21 Jan 2009 20:19:43 GMT
On Wed, Jan 21, 2009 at 1:39 PM, Valentina Medici
<valentina.medici@cup2000.it> wrote:
> Hi all!
> I have a MIME base64 decoded message in which the header
> Content-Transfer-Encoding is almost correct except for the fact that the
> new line after the header is missing. In the current implementation of
> mime4j (0.5) that file couldn't be decoded.
> In the proposed patch, if the Content-Transfer-Encoding is not
> recognized, it will be guessed if possible.

I am not sure about this. On the one hand Mime4j was "designed to be
extremely tolerant against messages violating the standards". On the
other hand I don't think that Mime4j should try to provide a
workaround for each and every malformed message out there.

> So, if the header is like the one I receive,i.e.:
> Content-Transfer-Encoding: base64 Content-Disposition: attachment;

A missing line break between two header lines is a grave error on the
sender's side. On the other hand extra content after a valid transfer
encoding could be ignored in the interest of being "extremely

Any other opinions?


> the Content-Transfer-Encoding is correctly guessed and the file
> correctly decoded. I just made a little change to
> org.apache.james.mime4j.descriptor.DefaultBodyDescriptor.
> The file Excample.txt attached is an example of file that can be decoded
> only with the patch.
> Thanks
> Valentina

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message