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

hyper-util: Add a version of conn::auto that doesn't need to read the version #3511

Open
sfackler opened this issue Dec 30, 2023 · 0 comments · May be fixed by hyperium/hyper-util#111
Open
Labels
A-server Area: server. C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. K-hyper-util Crate: hyper-util

Comments

@sfackler
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current conn::auto::Connection future always internally determines the appropriate protocol version to use. However, this decision should have already been made by ALPN when running over TLS (or via prior knowledge), so the ReadVersion logic ends up adding some overhead and allows bad clients to use an HTTP version they didn't negotiate.

Describe the solution you'd like
I'd like a version of Connection that's essentially just an enum of the h1 and h2 Connection futures and has to be explicitly told which to use, like the http2_only and http1_only methods in 0.14.

@sfackler sfackler added the C-feature Category: feature. This is adding a new feature. label Dec 30, 2023
@programatik29 programatik29 added A-server Area: server. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. K-hyper-util Crate: hyper-util labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-server Area: server. C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. K-hyper-util Crate: hyper-util
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants