Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
There are two modes to negotiate cleartext HTTP/2 connections. They are HTTP/2 connection preface and HTTP/1 upgrade requests. The default behavior is determined by ClientFactoryOptions.useHttp2Preface(). This option affects' http' and h2c, so even if a user uses h2c with prior knowledge, an upgrade request will be sent if useHttp2Preface() == false.
With prior knowledge, it is an unwanted behavior for useHttp2Preface() option to affect h2c scheme. h2c is an explicit scheme whose negotiation should be fixed to the HTTP/2 connection preface. Its endpoint may not understand the HTTP/1 upgrade.
So it would make more sense to apply to useHttp2Preface() option to adjust the default behavior of http. If both http and h2c follow useHttp2Preface(), there is no difference in behavior between them.
Modifications:
Always use HTTP/2 connection preface for h2c
useHttp2Preface() option now affects only http.
Result:
Armeria client always uses HTTP/2 connection preface for h2c, regardless of the value of useHttp2Preface().
Motivation:
There are two modes to negotiate cleartext HTTP/2 connections. They are HTTP/2 connection preface and HTTP/1 upgrade requests. The default behavior is determined by
ClientFactoryOptions.useHttp2Preface()
. This option affects' http' andh2c
, so even if a user usesh2c
with prior knowledge, an upgrade request will be sent ifuseHttp2Preface() == false
.With prior knowledge, it is an unwanted behavior for
useHttp2Preface()
option to affecth2c
scheme.h2c
is an explicit scheme whose negotiation should be fixed to the HTTP/2 connection preface. Its endpoint may not understand the HTTP/1 upgrade.So it would make more sense to apply to
useHttp2Preface()
option to adjust the default behavior ofhttp
. If bothhttp
andh2c
followuseHttp2Preface()
, there is no difference in behavior between them.Modifications:
h2c
useHttp2Preface()
option now affects onlyhttp
.Result:
Armeria client always uses HTTP/2 connection preface for
h2c
, regardless of the value ofuseHttp2Preface()
.