File: lib/ruby-h2/http-agent.rb:759–767
In handle_data (line 720–730), WINDOW_UPDATE is sent for the full payload including padding, then padding is stripped. In handle_gzipped_data (line 760), padding is stripped first, then WINDOW_UPDATE is sent for the stripped size only.
Per RFC 7540 §6.9.1, the entire frame payload including padding is counted in flow control. This means the flow-control window is under-replenished for padded GZIPPED_DATA frames, eventually stalling the sender.
Fix: move the strip_padding call after the WINDOW_UPDATE, matching the order used in handle_data.
File:
lib/ruby-h2/http-agent.rb:759–767In
handle_data(line 720–730), WINDOW_UPDATE is sent for the full payload including padding, then padding is stripped. Inhandle_gzipped_data(line 760), padding is stripped first, then WINDOW_UPDATE is sent for the stripped size only.Per RFC 7540 §6.9.1, the entire frame payload including padding is counted in flow control. This means the flow-control window is under-replenished for padded GZIPPED_DATA frames, eventually stalling the sender.
Fix: move the
strip_paddingcall after the WINDOW_UPDATE, matching the order used inhandle_data.