Body-related errors of requests over HTTP/2 are swallowed by Hyper
Nobody has claimed this yet.
- 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.
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
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 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