james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentina Medici <valentina.med...@cup2000.it>
Subject [mime4j] [PATCH] - Proposed patch to decode base64 messages with malformed Content-Transfer-Encoding headers
Date Wed, 21 Jan 2009 12:39:54 GMT
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.

So, if the header is like the one I receive,i.e.:

Content-Transfer-Encoding: base64 Content-Disposition: attachment;

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


-- 
Valentina Medici

CUP 2000 S.p.A.
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
tel. +39 051 4208411 - Fax +39 051 4208511

e-mail: valentina.medici@cup2000.it




Mime
View raw message