jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [servlet-spec users] Re: Re: Re: Re: Re: Re: Re: Re: Re: revised trailer proposals

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Fri, 21 Apr 2017 00:48:43 -0700

> On Apr 20, 2017, at 4:44 PM, Greg Wilkins <gregw_at_webtide.com> wrote:
>
>
>
> On 21 April 2017 at 08:33, Shing Wai Chan <shing.wai.chan_at_oracle.com <mailto:shing.wai.chan_at_oracle.com>> wrote:
> Let me summarize what we discussed in #getTrailers and with additional comemnts.
>
> I. Return null?
>
> OK
>
> Was there an issue II?
>
> III. Trailer vs Trailers.
> Should we rename our API as
> #getTrailerFields, #setTrailerFields or
> #getTrailer, #setTrailer?
> I prefer the former.
>
> I still prefer #getTrailers, but if we have to change then #getTrailerFields is second choice.
>
>
> III. The data structure for trailer.
> Currently choice is between:
> Map<String, String> - lower case keys, multiple fields merged.
> TreeMap<String, String> - case insensitive, multiple fields merged.
> Map<String, List<String>> - lower case keys, inconvenient
> TreeMap<String, List<String>> - case insensitive, inconvenient
> List<Map.Entry<String,String>> - ugly, very inconvenient
> 1. is simplest and probably sufficient
> 4. is most correct against the RFCs but a minor pain to use.

Since TreeMap is a Map, should we also consider Map<String, String> - case insensitive, ….?

Shing Wai Chan

>
> So I prefer either of those, but could lump any of the above.
>
> cheers
>
>
> --
> Greg Wilkins <gregw@webtide.com <mailto:gregw@webtide.com>> CTO http://webtide.com <http://webtide.com/>