james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: Bug in Message.MessageBuilder
Date Tue, 18 Mar 2008 19:34:32 GMT
hi antony

On Tue, Mar 18, 2008 at 12:23 AM, Antony Bowesman <adb@teamware.com> wrote:

> The Message.MessageBuilder class implements ContentHandler, but when
> parsing a
> multipart content type, never sets the subtype, so the Multipart object is
> always subtype "alternative".
> As the ContentTypeField throws away the main/subtypes and combines them
> into
> mimeType, shouldn't the startMultipart handler do something like
>    public void startMultipart(BodyDescriptor bd) {
>        expect(Entity.class);
>        Entity e = (Entity) stack.peek();
>        Multipart multiPart = new Multipart();
> -->>   multipart.setSubType(bd.getMimeType().substring(10));
>        e.setBody(multiPart);
>        stack.push(multiPart);
>    }

i'm a little confused: i can't find this code in

if you're using the latest code, then a patch would be easier for me to
understand. if you're not using the latest code, please checkout trunk,
build then retry. if you still have the problem then it'd be great if you
could create and contribute (https://issues.apache.org/jira/browse/MIME4J) a
unit test case that demonstrates the problem.

- robert

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message