You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mux-h1): second keep-alive request to an H2 backend answered 502 #1781
With an H1 client in front of an H2 backend, the second request on a keep-alive client connection is answered 502: the backend's response HEADERS on the new stream is refused ("CANNOT RECEIVE Headers ON THIS STREAM") and the backend connection gets GOAWAY(STREAM_CLOSED). It happens with a backend that keeps its connection open as well as with one that closes it between the two requests.
ConnectionH1::writable reuses the client stream slot for the next request without clearing back_received_end_of_stream, front_received_end_of_stream and the per-direction DATA counters, which the H2 frontend clears when it recycles a slot. The stale end-of-stream flag makes the H2 backend connection treat the new stream as already closed (RFC 9113 §5.1).
Expected: the second request is forwarded and answered like the first.
Activity
fix(mux-h1): clear end-of-stream flags on the keep-alive stream reset
test(mux-h1): pin keep-alive requests to an H2 backend with bodies
test(mux-h1): correct how the keep-alive test turns red
fix(mux-h1): clear end-of-stream flags on the keep-alive stream reset
test(mux-h1): pin keep-alive requests to an H2 backend with bodies
test(mux-h1): correct how the keep-alive test turns red
fix(mux-h1): clear end-of-stream flags on the keep-alive stream reset (…