Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Connecting to Jetty 9.3.8 http2 connector without ALPN

Hi,

On Thu, Mar 17, 2016 at 9:32 PM, Fabian Lange <lange.fabian@xxxxxxxxx> wrote:
> Hi,
> Preface: I am fully aware of the purpose of ALPN in the context of browsers.
>
> I am having a server which I control, and a client which I control.
> The server is currently running an h2 enabled connector:
>
> INFO  [2016-03-17 19:48:13,864] org.eclipse.jetty.setuid.SetUIDListener:
> Opened application@56e9a474{SSL,[ssl, alpn, h2, h2-17, h2-16, h2-15, h2-14,
> http/1.1]}{0.0.0.0:8445}

Configured in this way, this connector looks for an ALPN protocol, and
if none if detected, it falls back to a default protocol, typically
http/1.1.

> For the client side, I do not want to use ALPN, mostly because I do not
> control the java version, thus the installation would be complicated.

Okay.

> So I was wondering if it is possibly providing the HTTP2Client the necessary
> information to connect anyway.
>
> Currently I am doing the same, using a netty based client&server, which
> works (applicationProtocolConfig(ApplicationProtocolConfig.DISABLED)) but I
> prefer a slightly higher abstraction level, and the jetty client seems to
> give me that.
>
> I tried setting:
>  client.setClientConnectionFactory(new HTTP2ClientConnectionFactory());
>
> and variations, but most of it fails silently, so I have a hard time
> debugging that.
>
> NB: I want the communication to be encrypted. so h2c would only work if it
> could be done also over the h2 connector (which seems not to be the case)

Do I understand correctly that you want the client to connect to the
server *knowing* that on that port the server will speak HTTP/2 ?
You don't want to do any protocol negotiation, you just want to hit
the server with h2 (i.e. TLS+HTTP/2), no fallbacks, no other protocols
spoken by the server. Correct ?

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top