net/http: Server.ServeTLS docs are wrong about H/2 #24607
Closed
Labels
Milestone
Comments
Change https://golang.org/cl/103815 mentions this issue: |
Change https://golang.org/cl/125515 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jul 24, 2018
The only inaccurate part was the HTTP/2 caveat in Server.ServeTLS, which only applies to the plain Serve variant. The restriction implemented in shouldConfigureHTTP2ForServe is not on the setupHTTP2_ServeTLS codepath because ServeTLS owns the tls.Listener, so we fix it for the user instead of disabling HTTP/2. Fixes #24607 Change-Id: Ie5f207d0201f09db27bf81b75535e5f6fdaf91e2 Reviewed-on: https://go-review.googlesource.com/103815 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Since ServeTLS gets to create the tls.Listener, it can initialize the TLSConfig fully, and it does. So the second paragraph is wrong. (Probably because it was copied from Serve #23028.)
Also, ListenAndServeTLS doesn't mention H/2 at all, but applies the same rules as ServeTLS.
The rules are pretty messy, probably worth reviewing all [Server.][ListenAnd]Serve[TLS] docs.
See also #22018
The text was updated successfully, but these errors were encountered: