hyperium / hyperium/hyper

hyper_util: expose a timeout on ReadVersion in `server::conn::auto`

Open
#3,962 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-server C-feature E-pr-welcome K-hyper-util
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.