[jsr369-experts] Re: Call for discussion: API for apps do discover protocol version/transport?

From: Wenbo Zhu <wenboz_at_google.com>
Date: Tue, 13 Sep 2016 11:12:07 -0700

On Tue, Sep 13, 2016 at 11:00 AM, Edward Burns <edward.burns_at_oracle.com>

> Hello Volunteers,
> Currently I am not aware of any standard Servlet API to allow apps to
> discover the following
> * What protocol version is in use for the current request?
> * How did we get to that protocol version? Straight to h2? Or upgraded
> via 101 Switching Protocols?
> * What transport is being used? h2c or h2? Is ServletRequest.isSecure()
> enough?
> I think it might be useful to allow apps to answer these questions.

> Thoughts?
> A use case I already have is to allow the server to echo back the protocol
(more accurately, its properties) as a response header so client libraries
(e.g. frameworks on different platforms) can optimize the communication
based on, e.g. if the transport supports multiplexing.

It would be nice to define the set of properties that the client may care
about, v.s. hard-coded strings (as negotiated by TLS etc).

> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017