Skip to content

Fix HTTP/2 ALPN negotiation

Fix HTTP/2 with ALPN negotiation.

tls.NextProtos didn't specify "h2", so it disabled HTTP/2 in ALPN negotiation. I think we can leave it using the default options for now.

Here's an excerpt:

// For HTTP/2 support, srv.TLSConfig should be initialized to the // provided listener's TLS Config before calling Serve. If // srv.TLSConfig is non-nil and doesn't include the string "h2" in // Config.NextProtos, HTTP/2 support is not enabled.```

More info at https://github.com/golang/go/issues/14374

Merge request reports