users@servlet-spec.java.net

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

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

On Wed, Sep 14, 2016 at 4:00 AM, Edward Burns <edward.burns_at_oracle.com> wrote:
> 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?

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

>
> * 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.

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

Stuart

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