diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-10 20:28:14 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-10 21:08:41 +0000 |
commit | ab0ae44e91efec4440828406ef1929488a8b1b06 (patch) | |
tree | 65f033b58334631ea81624c5f6a4424e6d8d4603 | |
parent | 76f12cdaa2be0b96d314762ff5b2e403d1359cd8 (diff) | |
download | go-ab0ae44e91efec4440828406ef1929488a8b1b06.tar.gz go-ab0ae44e91efec4440828406ef1929488a8b1b06.zip |
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 <iant@golang.org>
-rw-r--r-- | src/net/http/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go index d78fd71a8d..120cd7bdf7 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -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 |