eclipse-vertx / vertx-grpc

Development of the gRPC component for Eclipse Vert.x
Eclipse Public License 2.0
43 stars 23 forks source link

The GrpcClient constructor should add http2ClearTextUpgrade(false) to passed HttpOptions #27

Open doctorpangloss opened 1 year ago

doctorpangloss commented 1 year ago

Version

4.3.7

Context

The GrpcClient constructors allow you to pass in custom HttpOptions.

Because httpOptions.setHttp2ClearTextUpgrade(false) must be set, the constructor should do it for you, like the default constructor does.

Steps to reproduce

  1. Create a client with GrpcClient.client(vertx, new HttpClientOptions()).
  2. Observe the server replies with an unexpected HTTP/1.1 protocol error.
  3. Observe GrpcClient.client(vertx, new HttpClientOptions().setHttp2ClearTextUpgrade(false)) resolves the issue.

This is a known issue. It is never valid to have this set to true (or the default) on a GrpcClient.