Repository navigation
fix(mux): refresh the backend-work flag after the frontend write - #1773
Merged
Merged
Conversation
FlorentinDUBOIS
force-pushed
the
fix/mux-1xx-rearm-backend-loop
branch
from
October 1, 2026 18:30
d007631 to
2d7f31e
Compare
Mux::ready_inner recorded whether any backend had work before the frontend write. Forwarding an interim 1xx re-arms the backend read (ConnectionH2::handle_1xx_reset, ConnectionH1::writable's interim arms) so the response bytes already buffered behind it get parsed, but only a resumed parked backend refreshed the flag. With an H2 frontend the loop then exited with the backend armed and no socket event left to wake it, and a final response written by an H1 backend together with its 1xx stalled until the backend hung up. The flag is now refreshed from every backend's readiness after the frontend write. RFC 9110 section 15.2. Fixes #1771 Signed-off-by: Florentin Dubois <[email protected]>
FlorentinDUBOIS
force-pushed
the
fix/mux-1xx-rearm-backend-loop
branch
from
October 1, 2026 20:09
2d7f31e to
b929629
Compare
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.
With an HTTP/2 frontend in front of an HTTP/1.1 backend that writes interim responses and the final response at once, the client got the interim HEADERS and the final response stalled until the backend hung up.
Mux::ready_innerrecorded whether any backend had work before the frontend write. Forwarding a 1xx re-arms the backend read (ConnectionH2::handle_1xx_reset,ConnectionH1::writable's interim arms) so the bytes already buffered behind it get parsed, but only a resumed parked backend refreshed that record, so the loop could exit with a backend armed and no socket event left to wake it.Fix: refresh the record from every backend's readiness after the frontend write. RFC 9110 §15.2.
Tests (e2e):
test_h2_to_h1_103_and_final_in_one_write,test_h2_to_h1_102_103_and_final_in_one_write; the backend keeps its connection open, so only the buffered bytes can deliver the final response.Fixes #1771