james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Bug in Message.MessageBuilder
Date Tue, 18 Mar 2008 00:23:58 GMT
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);
    }

Antony


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


Mime
View raw message