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

HTTP2 should strip connection headers before sending #1551

Closed
seanmonstar opened this issue Jun 6, 2018 · 1 comment
Closed

HTTP2 should strip connection headers before sending #1551

seanmonstar opened this issue Jun 6, 2018 · 1 comment
Labels
A-http2 Area: HTTP/2 specific. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@seanmonstar
Copy link
Member

Connection-specific headers are forbidden in HTTP2, as that information has been moved into frame types of the h2 protocol. hyper should strip those headers before sending a request or response over HTTP2.

Steps to fix

  • Update proto::h2::strip_connection_headers to inspect the value of the CONNECTION header, and remove all headers it references. See this code for how.
  • Also remove other headers that h2 has determined are "connection" headers, such as those in this code.
@seanmonstar seanmonstar added E-easy Effort: easy. A task that would be a great starting point for a new contributor. C-feature Category: feature. This is adding a new feature. A-http2 Area: HTTP/2 specific. labels Jun 6, 2018
@joshleeb
Copy link

joshleeb commented Jun 8, 2018

I'll start taking a look at this one 😄

seanmonstar pushed a commit that referenced this issue Jun 9, 2018
Automatically removes "connection" headers before sending over HTTP2.
These headers are illegal in HTTP2, and would otherwise cause errors.

Closes: #1551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-http2 Area: HTTP/2 specific. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

No branches or pull requests

2 participants