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

Refactor HTTP upgrades into Extensions #2340

Closed
seanmonstar opened this issue Nov 20, 2020 · 1 comment · Fixed by #2353
Closed

Refactor HTTP upgrades into Extensions #2340

seanmonstar opened this issue Nov 20, 2020 · 1 comment · Fixed by #2353
Labels
A-http1 Area: HTTP/1 specific. C-refactor Category: refactor. This would improve the clarity of internal code. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.

Comments

@seanmonstar
Copy link
Member

In #2086, it was outlined how the HTTP upgrades should be moved off the Body type (and into Extensions). The public facing part was done, now we just need to update the internal proto::h1 stuff to stash them into the Extensions instead of on a private Body field.

In order to do so, the proto::MessageHead will need to gain an extensions field, so we can place them there.

@seanmonstar seanmonstar added E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. A-http1 Area: HTTP/1 specific. C-refactor Category: refactor. This would improve the clarity of internal code. labels Nov 20, 2020
@aknuds1
Copy link
Contributor

aknuds1 commented Dec 6, 2020

I'd like to try solving this if it's OK? I started a draft PR #2353, but could use some guidance as I'm unsure about a few things (some basic Rust things, and how to get state into the extensions of Requests and Responses f.ex.). I'm interested in learning to contribute to hyper, and this looks like it could be a place to start :)

aknuds1 added a commit to aknuds1/hyper that referenced this issue Dec 13, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
aknuds1 added a commit to aknuds1/hyper that referenced this issue Dec 13, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
aknuds1 added a commit to aknuds1/hyper that referenced this issue Dec 13, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
aknuds1 added a commit to aknuds1/hyper that referenced this issue Dec 13, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
aknuds1 added a commit to aknuds1/hyper that referenced this issue Dec 15, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
aknuds1 added a commit to aknuds1/hyper that referenced this issue Dec 15, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
seanmonstar pushed a commit that referenced this issue Dec 15, 2020
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes #2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this issue Jul 26, 2021
Move state required for protocol upgrades to head
representations, instead of associating it with the body.

Closes hyperium#2340.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-http1 Area: HTTP/1 specific. C-refactor Category: refactor. This would improve the clarity of internal code. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants