jsr369-experts@servlet-spec.java.net

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

From: Greg Wilkins <gregw_at_webtide.com>
Date: Wed, 12 Apr 2017 11:07:24 +1000

All,

I'm a bit agnostic on the matter of Map<String,String> vs
Map<String,List<String>> as regardless we will have to check strings for
CSV anyway.

I'm a bit cautious about the setTrailerCallback(Consumer<Map<String,
String>> callback) API because there are insufficient details about when
and who will call callback.accept(trailers)). If it is a true
container callback, then it needs to be treated like the other container
callbacks - context classloader set, mutually excluded from other callbacks
etc.

Alternately, we could say that it will only ever be called by the thread
that calls HttpInput.read() and is about the return -1, but immediately
prior to that will call accept?

Either way, I don't see much improvement on a method like








On 12 April 2017 at 08:31, Mark Thomas <markt_at_apache.org> wrote:

> On 11/04/17 22:07, Shing Wai Chan wrote:
> > Taking into account Stuart and Greg's responses, here is a revised
> > proposal.
>
> <snip/>
>
> > ACTION: Revised recommendations are now A.e ConsumerCallback and B.c
> > SupplierMap.
>
> I'd be happy with those but I'd prefer the Map to be
> Map<String,List<String>>.
>
> Per RFC 7230 section 3.2.2 the only use case for this should be multiple
> Set-Cookie headers in the response but
> a) I think we should handle that; and
> b) I think it is better to use the same format on the input for symmetry.
>
> Mark
>
>


-- 
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com