-
Notifications
You must be signed in to change notification settings - Fork 183
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
Conversation
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.
private static final HttpProtocolConfig[] H2H1 = new HttpProtocolConfig[] {h2Default(), h1Default()}; | ||
|
||
private enum ProtocolTestMode { | ||
ServerH1_ClientH1H2(H1, H1H2), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
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.