What about leaving the constants as they are and using a TreeMap with
a case insensitive comparator?

Andreas

On Tue, Nov 17, 2009 at 17:04, Amila Suriarachchi
<amilasuriarach...@gmail.com> wrote:
> On Tue, Nov 17, 2009 at 5:56 PM, Andreas Veithen
> <andreas.veit...@gmail.com>wrote:
>
>> Amila,
>>
>> The BaseConstants are shared among all transports and are potentially
>> used by code outside of the transports. Can you guarantee the this
>> change would not have any impact?
>>
> Theoretically changing a value of a string constant should not make any
> problem. I tested the mail transport.
> for others I can run the test suite and see.
>
> If there is a bug we need to fix that too. So I think it is ok to do this
> change.
>
> for mail transport we need to change following constants in the
> MailConstant.
>
> public static final String MAIL_HEADER_TO          = "to";
>    public static final String MAIL_HEADER_FROM        = "from";
>    public static final String MAIL_HEADER_CC          = "cc";
>    public static final String MAIL_HEADER_BCC         = "bcc";
>    public static final String MAIL_HEADER_REPLY_TO    = "reply-to";
>    public static final String MAIL_HEADER_IN_REPLY_TO = "in-reply-to";
>    public static final String MAIL_HEADER_SUBJECT     = "subject";
>    public static final String MAIL_HEADER_MESSAGE_ID  = "message-id";
>    public static final String MAIL_HEADER_REFERENCES  = "references";
>
>    // Custom headers
>    /** @see org.apache.axis2.transport.mail.WSMimeMessage */
>    public static final String MAIL_HEADER_X_MESSAGE_ID = "x-message-id";
>
> thanks,
> Amila.
>
>
>>
>> Andreas
>>
>> On Tue, Nov 17, 2009 at 12:50, Amila Suriarachchi
>> <amilasuriarach...@gmail.com> wrote:
>> > this patch fix this issue.
>> >
>> > thanks,
>> > Amila.
>> >
>> > On Tue, Nov 17, 2009 at 8:20 AM, Amila Suriarachchi
>> > <amilasuriarach...@gmail.com> wrote:
>> >>
>> >>
>> >> On Tue, Nov 17, 2009 at 12:49 AM, Andreas Veithen
>> >> <andreas.veit...@gmail.com> wrote:
>> >>>
>> >>> On Mon, Nov 16, 2009 at 09:46, Amila Suriarachchi
>> >>> <amilasuriarach...@gmail.com> wrote:
>> >>> > hi,
>> >>> >
>> >>> > According to [1] (3.4.7) smtp headers should handle case independent
>> >>> > maner.
>> >>> >
>> >>> > i.e. it should be able to process if a message comes with an
>> >>> > 'in-reply-to'
>> >>> > header.
>> >>>
>> >>> What do you mean by "it"??
>> >>
>> >> mail transport. (MailTransportListner)
>> >>
>> >> according to that spec[1] it is valid to receive 'In-Reply-To' header as
>> >> 'in-reply-to'.
>> >> this is true for any header.
>> >> but since mail transport put the header as it is to header map and get
>> >> with the specified
>> >> name, header should come as in the value specified in the constants
>> file.
>> >>
>> >> thanks,
>> >> Amila.
>> >>
>> >> [1] http://www.w3.org/Protocols/rfc822/
>> >>>
>> >>> > to do this I would like to change the header names to lower case
>> before
>> >>> > adding to the map and
>> >>> > make all the constant field values to lower case.
>> >>> >
>> >>> > [1] http://www.w3.org/Protocols/rfc822/
>> >>> > --
>> >>> > Amila Suriarachchi
>> >>> > WSO2 Inc.
>> >>> > blog: http://amilachinthaka.blogspot.com/
>> >>> >
>> >>
>> >>
>> >>
>> >> --
>> >> Amila Suriarachchi
>> >> WSO2 Inc.
>> >> blog: http://amilachinthaka.blogspot.com/
>> >
>> >
>> >
>> > --
>> > Amila Suriarachchi
>> > WSO2 Inc.
>> > blog: http://amilachinthaka.blogspot.com/
>> >
>>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>

Reply via email to