-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecvStream::is_end_stream() shouldn't return true after encountering error #806
Labels
Comments
I think you're right. Want to submit a pull request fixing this? |
Yes will do. Thanks for the confirmation. |
eaufavor
added a commit
to eaufavor/h2
that referenced
this issue
Nov 4, 2024
…received Before this change, it returned true on other types of disconnection as well. Fixes hyperium#806
eaufavor
added a commit
to eaufavor/h2
that referenced
this issue
Nov 4, 2024
…received Before this change, it returned true on other types of disconnection as well. Fixes hyperium#806
eaufavor
added a commit
to eaufavor/h2
that referenced
this issue
Nov 12, 2024
…received Before this change, it returned true on other types of disconnection as well. Fixes hyperium#806
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the doc
However in reality, it would return true also after the connection / stream encounters errors because
h2/src/proto/streams/recv.rs
Lines 560 to 562 in 77be664
and
is_recv_closed
is true regardless of the actual cause of the closureh2/src/proto/streams/state.rs
Lines 416 to 420 in 77be664
The problem of
RecvStream::is_end_stream()
returning true after encountering error is that it hints the user that the http request finishes successfully. So incomplete responses might be interpreted as complete ones.My suggestion is that this function should only return true after seeing END_STREAM flag.
The text was updated successfully, but these errors were encountered: