Skip to content
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/net/http2: client should drop connection specific headers #15085

jmhodges opened this issue Apr 3, 2016 · 2 comments

x/net/http2: client should drop connection specific headers #15085

jmhodges opened this issue Apr 3, 2016 · 2 comments


Copy link

@jmhodges jmhodges commented Apr 3, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
  2. What operating system and processor architecture are you using (go env)?
    OS X and Linux (but it affects any of them)
  3. What did you do?

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 of the HTTP/2 spec, connection-specific headers are to be dropped by HTTP/2 clients.

See this sample code that talks to

  1. What did you expect to see?

A working GET request to an HTTP/2 server that returns a 200

  1. What did you see instead?

A 400 Bad Request response from the HTTP/2 server.

This was discovered in google/certificate-transparency#1136

@jmhodges jmhodges changed the title x/net/http2: x/net/http2: client should drop connection specific headers Apr 3, 2016
Copy link
Contributor Author

@jmhodges jmhodges commented Apr 3, 2016

(Original link in the issue went to a sample that hit, instead of That would redirect on success, so I've swapped out the sample for one that went to

Copy link

@bradfitz bradfitz commented Apr 3, 2016


@golang golang locked and limited conversation to collaborators Apr 5, 2017
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 and adds a test
to check this.

Fixes golang/go#15085

Change-Id: Ie4624680c5de1f13eb94fa58a2d5d67a02634df3
Reviewed-by: Brad Fitzpatrick <>
Run-TryBot: Brad Fitzpatrick <>
TryBot-Result: Gobot Gobot <>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants