hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.35k stars 270 forks source link

Refactor errors (fixes #530) #556

Closed nox closed 2 years ago

nox commented 3 years ago

h2::Error now knows whether protocol errors happened because the user sent them, because it was received from the remote peer, or because the library itself emitted an error because it detected a protocol violation.

It also keeps track of whether it came from a RST_STREAM or GO_AWAY frame, and in the case of the latter, it includes the additional debug data if any.

nox commented 3 years ago

Seems like there are no tests for resets, will check that out.

nox commented 3 years ago

The errors are fixed by https://github.com/hyperium/h2/pull/557.