x/net/http2: client should drop connection specific headers #15085
Comments
(Original play.golang.org link in the issue went to a sample that hit google.com, instead of www.google.com. That would redirect on success, so I've swapped out the sample for one that went to www.google.com) |
Thanks! |
c3mb0
pushed a commit
to c3mb0/net
that referenced
this issue
Apr 2, 2018
Adds Keep-Alive to the list of ignored headers in encodeHeaders as required in the HTTP/2 spec (section 8.1.2.2) and adds a test to check this. Fixes golang/go#15085 Change-Id: Ie4624680c5de1f13eb94fa58a2d5d67a02634df3 Reviewed-on: https://go-review.googlesource.com/21482 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
go version
)?1.6.0
go env
)?OS X and Linux (but it affects any of them)
net/http2 errors when adding a connection-specific header to client requests.
For example, adding a Keep-Alive header to an HTTP request (as the Google certificate-transparency client does) and have it go over an HTTP/2 connection.
Per Section 8.1.2.2 of the HTTP/2 spec, connection-specific headers are to be dropped by HTTP/2 clients.
See this sample code that talks to www.google.com: http://play.golang.org/p/W2C9LfLBlO
A working GET request to an HTTP/2 server that returns a 200
A 400 Bad Request response from the HTTP/2 server.
This was discovered in google/certificate-transparency#1136
The text was updated successfully, but these errors were encountered: