Skip to content

Commit ab0ae44

Browse files
committed
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/33090 Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 76f12cd commit ab0ae44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/net/http/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,8 @@ type Server struct {
23082308
// handle HTTP requests and will initialize the Request's TLS
23092309
// and RemoteAddr if not already set. The connection is
23102310
// automatically closed when the function returns.
2311-
// If TLSNextProto is nil, HTTP/2 support is enabled automatically.
2311+
// If TLSNextProto is not nil, HTTP/2 support is not enabled
2312+
// automatically.
23122313
TLSNextProto map[string]func(*Server, *tls.Conn, Handler)
23132314

23142315
// ConnState specifies an optional callback function that is

0 commit comments

Comments
 (0)