Commit ab0ae44e authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: fix documentation on Server.TLSNextProto controlling http2

Server.TLSNextProto being nil is necessary but not sufficient but
http2 being automatically enabled.

Fixes #16588

Change-Id: I5b18690582f9b12ef05b58235e1eaa52483be285
Reviewed-on: https://go-review.googlesource.com/33090Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 76f12cda
......@@ -2308,7 +2308,8 @@ type Server struct {
// handle HTTP requests and will initialize the Request's TLS
// and RemoteAddr if not already set. The connection is
// automatically closed when the function returns.
// If TLSNextProto is nil, HTTP/2 support is enabled automatically.
// If TLSNextProto is not nil, HTTP/2 support is not enabled
// automatically.
TLSNextProto map[string]func(*Server, *tls.Conn, Handler)
// ConnState specifies an optional callback function that is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment