Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test for gRPC over h1, negotiated by TLS+ALPN #2216

Merged
merged 4 commits into from
May 17, 2022

Conversation

Scottmitch
Copy link
Member

Motivation:
ServiceTalk can do gRPC over HTTP/1.x, and it can negotiate
protocols with TLS via ALPN. This isn't expected to be commonly
used in practice but is possible given the layering of transports
below protocol.

Motivation:
ServiceTalk can do gRPC over HTTP/1.x, and it can negotiate
protocols with TLS via ALPN. This isn't expected to be commonly
used in practice but is possible given the layering of transports
below protocol.
@bondolo bondolo added the docs Improvements for documentation and examples label May 16, 2022
private static final HttpProtocolConfig[] H2H1 = new HttpProtocolConfig[] {h2Default(), h1Default()};

private enum ProtocolTestMode {
ServerH1_ClientH1H2(H1, H1H2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it perhaps worth testing the ServerH1_ClientH1 case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With h1-h1 there will be no ALPN involved, but should still work. Testing it won't harm for sure

private static final HttpProtocolConfig[] H2H1 = new HttpProtocolConfig[] {h2Default(), h1Default()};

private enum ProtocolTestMode {
ServerH1_ClientH1H2(H1, H1H2),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With h1-h1 there will be no ALPN involved, but should still work. Testing it won't harm for sure

@Scottmitch Scottmitch merged commit 8127bde into apple:main May 17, 2022
@Scottmitch Scottmitch deleted the grpc_with_h1 branch May 17, 2022 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements for documentation and examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants