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
h2c support: upgrade insecure connections to http2 #1966
Comments
Let me try this :) |
It looks like h2c is the transport that the grpc-java client uses when connecting to a localhost server. If you try to use Akka HTTP as a gRPC proxy, even with
Documentation on the
|
It depends on what you set as https://grpc.io/grpc-java/javadoc/io/grpc/netty/NegotiationType.html : TLS is 'normal' HTTPS HTTP2, PLAINTEXT is #1934 and PLAINTEXT_UPGRADE is h2c. @dsilvasc if you see that message in an Akka HTTP server it suggests the connection is 'raw' HTTP2 as supported by #1934, and not using the h2c upgrade mechanism. |
@satansk did you have any luck with this so far? |
@raboof not really, but I'm still working on this. |
@satansk OK that's great! I'm also planning on having a look, so I'll share and we can compare notes. |
I added some 'work in progress' in https://github.com/akka/akka-http/compare/h2c. I added a 'generic' upgrade mechanism next to the existing websocket upgrade mechanism. If this works out it would be interesting to see if we can remove the websocket-specific parts and have websockets support live on top of the generic support as well, in a binary compatible way. There's still some features and tests missing, but 'nghttp -v -u -H':method:GET' http://localhost:8080/whatever' already looks like it successfullly upgrades the connection (with some things missing, see the TODO's in that branch). |
@raboof That's awesome. I think it's a good idea to have HTTP and websocket to use the same upgrade method, and sorry for my delayed work. |
There are 2 mechanisms for supporting http/2 on insecure connections: with prior knowledge (#1934) or with h2c using the HTTP Upgrade mechanism (http://httpwg.org/specs/rfc7540.html#discover-http).
We're unsure how widely used h2c is and are not currently planning to implement it, but if anyone would express interest or contribute it that would be great!
The text was updated successfully, but these errors were encountered: