hyperium / hyperium/hyper

Body-related errors of requests over HTTP/2 are swallowed by Hyper

Open
#2,547 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-http2
Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

Errors emitted by the HttpBody impl sent as a request body through the HTTP/2 client are not returned to the caller.

https://github.com/hyperium/hyper/blob/8a05f8eec133793899c94dcbf1520eee3b91aa50/src/proto/h2/client.rs#L243-L247

I understand that this is because contrary to HTTP/1, the request body can be sent at the same as the response is received, so Hyper doesn't wait before returning the response, but that also means that the errors completely disappear and Hyper only notices something went wrong when trying to receive the response body, at which point it returns to the caller an error about the stream being reset.

Any ideas on how to improve that? Maybe we should implement an Extension that lets us await on a one-time channel to get the error?

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 at src/proto/h2/client.rs around lines 243-247 and trace how errors from the HttpBody request body are handled while the response is returned. Compare the HTTP/2 request and response flow with the issue description. Done means a caller can receive the request-body error rather than only a later stream-reset error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.