Closed rnro closed 1 year ago
Too late here, but we need to fix this up. flowControlledSize
is a bad name for what this calculates. More broadly, I don't think we should calculate in this way at all: I don't think counting control frames against our window here makes any sense.
The only frames in HTTP/2 that are actually flow controlled are DATA frames. I think either the channels should only count DATA frames, or we should rename this variable to something else.
Motivation:
estimatedFrameSize
aims to estimate the number of bytes a frame will use on the wire. It includes the 9-octed frame header and is currently used for flow control estimates but according to spec it shouldn't include those 9 bytes https://www.rfc-editor.org/rfc/rfc9113.html#section-6.9.1Modifications:
Replace
estimatedFrameSize
withflowControlledSize
which ignores the 9-octed frame header and update tests.Result:
Flow control calculations should be more accurate