Skip to content

Ability to specify the path used by negotiationType(PLAINTEXT_UPGRADE) #12013

@cowwoc

Description

@cowwoc

Is your feature request related to a problem?

Yes. Docker uses BuildKit under the hood. In order to establish a gRPC connection with BuildKit, we are supposed to send an HTTP POST request to a /grpc REST endpoint with the following headers:

Connection: Upgrade
Upgrade: h2c

Here is the relevant code in the Docker codebase:

Currently, NettyChannelBuilder.negotiationType(NegotiationType.PLAINTEXT_UPGRADE) is hard-coded to use a context path of /: https://github.com/grpc/grpc-java/blob/master/netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java#L881

Describe the solution you'd like

Provide a way to specify which context path to apply PLAINTEXT_UPGRADE against.

Describe alternatives you've considered

Copy/paste the existing code into my own codebase, and manually change the hard-coded path.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions