mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-03 08:17:59 +00:00
BUG/MEDIUM: h2: properly account for DATA padding in flow control
Recent fixes made to process partial frames broke the flow control on DATA frames, as the padding is not considered anymore, only the actual data is. Let's simply take account of the padding once the transfer ends. The probability to meet this bug is low because, when used, padding is small and it can require a large number of padded transfers before the window is completely depleted. Thanks to user klzgrad for reporting this bug and confirming the fix. This fix must be backported to 1.8.
This commit is contained in:
parent
50791a7df3
commit
d1023bbab3
@ -2788,6 +2788,9 @@ static int h2_frt_transfer_data(struct h2s *h2s, struct buffer *buf, int count)
|
||||
/* here we're done with the frame, all the payload (except padding) was
|
||||
* transferred.
|
||||
*/
|
||||
h2c->rcvd_c += h2c->dpl;
|
||||
h2c->rcvd_s += h2c->dpl;
|
||||
h2c->dpl = 0;
|
||||
h2c->st0 = H2_CS_FRAME_A; // send the corresponding window update
|
||||
|
||||
/* don't send it before returning data!
|
||||
|
Loading…
Reference in New Issue
Block a user