james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Wiedmann (JIRA)" <server-...@james.apache.org>
Subject [jira] Updated: (MIME4J-22) [JW#2] Let BodyDescriptor provide full blown access to the headers
Date Tue, 04 Sep 2007 19:04:46 GMT

     [ https://issues.apache.org/jira/browse/MIME4J-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jochen Wiedmann updated MIME4J-22:
----------------------------------

    Attachment: mime4j-pluggable-body-descriptor-2.patch

Updated patch, following the issues raised by Stefano:

- The method newBodyDescriptor returns BodyDescriptor, as it should.
- The SimpleContentHandler does again honour the transport encoding. (That change went in
  accidentally. It is my conviction, that these things should be handled by mime4j transparently,
  but I admit that this is another topic.)


> [JW#2] Let BodyDescriptor provide full blown access to the headers
> ------------------------------------------------------------------
>
>                 Key: MIME4J-22
>                 URL: https://issues.apache.org/jira/browse/MIME4J-22
>             Project: Mime4j
>          Issue Type: Wish
>            Reporter: Robert Burrell Donkin
>         Attachments: mime4j-pluggable-body-descriptor-2.patch, mime4j-pluggable-body-descriptor.patch
>
>
> http://mail-archives.apache.org/mod_mbox/james-server-dev/200708.mbox/%3ce75283b10708051908w38b3b7b5l31ef423d33efe014@mail.gmail.com%3e
number 2
> 2.) Let BodyDescriptor provide full blown access to the headers
>       Currently, BodyDescriptor offers access to the content-type and
>       content-transfer-encoding headers only.
>      As a consequence, the mime4j user is forced to listen for T_FIELD events
>      and build its own header map. This is duplicated work, in
> particular, because
>      all mime4j users will likely do the same.
>      I'd propose to:
>        - Replace BodyDescriptor with an interface. (Assumes that this
> is possible,
>          I am guessing by the version number 0.4, but I maybe wrong.)
>        - Make the BodyDescriptor implementation pluggable by adding a method
>            protected void newBodyDescriptor()
>          to the Mime4JTokenStream.
>        - Provide a default implementation that maintains a map of headers and
>          values.
>        - Open up the method
>              private void getHeaderParams(String)
>          by making it static and moving it to a utility class or by
> providing an accessor
>          that takes a header name as an argument and invokes the
> method by providing
>          the value as input.
>        - Rename getParameters() to getContentTypeParameters(),
> because the method
>          name is definitely confusing. I clearly had the impression
> that this method would
>          provide the header values.

-- 
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


Mime
View raw message