Various h3 improvements - #18904
Closed
MegaManSec wants to merge 2 commits into
Closed
Conversation
Contributor
|
The function I agree with the fix to report |
Contributor
Author
Indeed:) Sorry, I submitted this PR, saw it failed, then have had 0 free time to correct it. |
Contributor
Author
Contributor
|
Agreed. Revert that change and the PR looks fine to me. Could you open a short issue about the needed fix in the block handling? Just so it does not get lost. |
Contributor
Author
|
Done; #18905 |
icing
approved these changes
Oct 7, 2025
bagder
pushed a commit
that referenced
this pull request
Oct 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes three robustness issues in the HTTP/3 (ngtcp2/nghttp3) path:
Stream leak on submit failure
After successfully opening a QUIC bidi stream, if nghttp3_conn_submit_request() fails, the code left the QUIC stream open. We now call cf_ngtcp2_stream_close() to cancel the just-opened stream and flush egress, preventing a leaked stream on the wire. Note: used_bidi_streams remains monotonic by design and is not decremented.
Incorrect stream marked as QUIC-flow-blocked
When ngtcp2_conn_writev_stream() returns NGTCP2_ERR_STREAM_DATA_BLOCKED, the code previously marked quic_flow_blocked on the transfer associated with x->data, which may not correspond to stream_id. We now look up the correct Curl_easy via ngtcp2_conn_get_stream_user_data(stream_id), mark that stream’s context, and nudge the multi with Curl_multi_mark_dirty().
Undefined error returned from nghttp3 callback
cb_h3_recv_header() returned -1 on errors, which is not a defined nghttp3 error code. We now return NGHTTP3_ERR_CALLBACK_FAILURE so nghttp3 can correctly classify and handle the failure.
Note: These patches were created with LLMs.