I'm writing an embedded web server for an Android app with httpcore5-h2
5.3.5 and conscrypt-android 2.5.3. Because I'm using Conscrypt, I assumed
that I should use ConscryptServerTlsStrategy, but it seems that
ConscryptServerTlsStrategy always uses ALPN to try to negotiate HTTP2 with
clients, even if the server is configured for HTTP1 (either by using
AsyncServerBootstrap, or with setVersionPolicy(FORCE_HTTP_1)). This causes
connections to fail for clients that are HTTP2-capable because the client
is speaking HTTP2 and the server is not.

I can make things work by using BasicTlsServerStrategy instead as it
apparently doesn't use ALPN, but I have these questions:

* Is there a way to configure/disable ALPN with ConscryptServerTlsStrategy?
* Is it safe to use BasicTlsServerStrategy with Conscrypt?
* Am I losing anything by not using ConscryptServerTlsStrategy?

As for why I don't want to allow HTTP2, this is an attempted workaround for
a separate problem I'm still investigating.

Thanks!
Roy

Reply via email to