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

Closed
jmhodges opened this issue Apr 3, 2016 · 2 comments
Closed

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

jmhodges opened this issue Apr 3, 2016 · 2 comments
Assignees
Milestone

Comments

@jmhodges
Copy link
Contributor

@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)?
    1.6.0
  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 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

  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
@jmhodges

This comment has been minimized.

Copy link
Contributor Author

@jmhodges jmhodges commented Apr 3, 2016

(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)

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Apr 3, 2016

Thanks!

@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 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.