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

From: Edward Burns <edward.burns_at_oracle.com>
Date: Tue, 13 Sep 2016 19:13:00 -0700

>>>>> On Wed, 14 Sep 2016 08:33:41 +1000, Stuart Douglas <sdouglas_at_redhat.com> said:

EB> * What protocol version is in use for the current request?

SD> Isn't that what javax.servlet.ServletRequest#getProtocol() is
SD> supposed to return?

Indeed it is. Thanks for reminding me of that.

EB> * How did we get to that protocol version? Straight to h2? Or upgraded
EB> via 101 Switching Protocols?

But what about this case? Is it not important?

SD> Personally I think that a combination of getProtocol() and isSecure()
SD> should provide enough information.

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

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

Would Stuart's observation support your use case, Wenbo?

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

This sort of thing was discussed on the "Removing headers from the
response" from December 2014(!).

Upon re-activation, I wrote:

>>>>> On Fri, 2 Sep 2016 13:22:48 -0700, Edward Burns <edward.burns_at_oracle.com> said:

EB> There was additional tangential content on the thread that I will
EB> address in another email.

So here is another request for that particular tangent.

Wenbo, may I be so bold as to ask you to top-post another thread
addressing your "define the set of properties" idea? One aspect of the
art in doing so is accurately naming the thread, since this idea has
many facets.

>>>>> On Wed, 14 Sep 2016 09:13:44 +1000, Greg Wilkins <gregw_at_webtide.com> said:

GW> Note that there are near infinite permutations and combinations of how
GW> requests can arrive on an application server, as the protocol from the
GW> client to the app server can be proxied/translated zero or more times.


GW> So I think we are good as is.

But what about knowing if the connection was upgraded. Is that not
worth knowing, or can it be derived using existing API?

I'll move Greg's query regarding RFC7239 support to another thread.



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