New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/crypto/acme/autocert: NewListener does not enable HTTP2. #20572
Comments
If this is indeed considered a bug worth fixing, I would like to fix it. |
While that would work for you, I wonder if it would break (1) anybody not expecting HTTP/2 (people not using net/http?) or whether (2) there are net/http paths where the http2.ConfigureServer path isn't invoked. I worry about the case where the client thinks it can do h2 but the server isn't wired up to accept h2. For (1), we can just document it. It's new enough and I imagine everybody is using net/http for it. And if you're running, say, an SMTP server, the client won't be trying to do h2. For (2), I'd just want to audit the various paths again. I forget how the auto-http2.ConfigureServer code works. But yeah, no real objections. |
I will work on this |
@bradfitz Just to clarify what needs to be done for (2), would you like me to audit all |
Yes. |
|
CL https://golang.org/cl/45630 mentions this issue. |
Enables HTTP/2 on any servers used with the autocert listener by setting "h2" in NextProtos of the listener *tls.Config. Also adds a warning to the listener documentation that it enables HTTP/2. Fixes golang/go#20572 Change-Id: If7c0f5722f0b1781789219fc4e84da3f19a89ab7 Reviewed-on: https://go-review.googlesource.com/45630 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Enables HTTP/2 on any servers used with the autocert listener by setting "h2" in NextProtos of the listener *tls.Config. Also adds a warning to the listener documentation that it enables HTTP/2. Fixes golang/go#20572 Change-Id: If7c0f5722f0b1781789219fc4e84da3f19a89ab7 Reviewed-on: https://go-review.googlesource.com/45630 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Enables HTTP/2 on any servers used with the autocert listener by setting "h2" in NextProtos of the listener *tls.Config. Also adds a warning to the listener documentation that it enables HTTP/2. Fixes golang/go#20572 Change-Id: If7c0f5722f0b1781789219fc4e84da3f19a89ab7 Reviewed-on: https://go-review.googlesource.com/45630 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Enables HTTP/2 on any servers used with the autocert listener by setting "h2" in NextProtos of the listener *tls.Config. Also adds a warning to the listener documentation that it enables HTTP/2. Fixes golang/go#20572 Change-Id: If7c0f5722f0b1781789219fc4e84da3f19a89ab7 Reviewed-on: https://go-review.googlesource.com/45630 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
What version of Go are you using (
go version
)?go version go1.8.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I deployed a server using
autocert.NewListener
to acquire a certificate. I was surprised to see the server did not have HTTP2 enabled.What did you expect to see?
I expected the server to have HTTP2 enabled.
What did you see instead?
The server did not have HTTP2 enabled.
There's a fairly simple fix for this, simply adding
after line 72 in
listener.go
enables HTTP2 support on the server.The text was updated successfully, but these errors were encountered: