Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
=htc Support `UseHttp2.Negotiated` for http2 connections over plain http #2543
If we want to support things like serving unencrypted gRPC traffic from the same server instance as unencrypted REST traffic—we already support serving encrypted gRPC traffic and REST traffic from the same server as is with UseHttp2.ALWAYS—then the server logic needs to be changed.
This draft PR adds support for a new UseHttp2 setting called PriorKnowledge,
Adds a PriorKnowledgeSwitch in the same vein as AlpnSwitch, and then sniffs the initial bytes of each request to match against the HTTP2 Prior Knowledge preamble.
This feature, assuming approval by the maintainers, will be getting a test suite to verify the implementation. Current testing has been done with
use the curl flag
raboof left a comment
First look: looks good, couple of comments here and there. Haven't looked closely at the changes to the main
It doesn't seem pressing to merge it right now, so I'd rather improve it first and then merge it, instead of adding a rarely-used feature to our pile of code we have no capacity to maintain. Especially, the public API part needs to be figured out, since