hyper_util: expose a timeout on ReadVersion in `server::conn::auto`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
When serving h1 directly, hyper currently has a time on reading the initial headers (see https://github.com/hyperium/hyper/issues/3178 for context/the PR). However, with auto there is no timer on the ReadVersion, which makes this timer unreachable until the ReadVersion is complete.
The impact of this is that the user can open up a connection indefinitely without sending any data which is a DoS vector.
Describe the solution you'd like
An (opt in, perhaps?) timeout on server::conn::auto
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the implementation of server::conn::auto and the existing h1 initial-header timeout referenced in the issue. Trace where ReadVersion waits and how timeout configuration could be exposed, then review nearby tests. Done means an opt-in timeout prevents an idle connection from waiting indefinitely, with coverage for the configured behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, networking, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100