-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/net/http2: Server doesn't respect client's flow control #16498
Comments
I'm not going to get this done in time. Punting to Go 1.9. It hasn't mattered so far, and it doesn't matter in practice because client's typically just give servers effectively-infinite flow control. Clients don't typically throttle servers. Servers would probably tire of that and hang up on them anyway if they did. |
Probably a dumb question ... doesn't the code below respect the client's flow control? There's also this test. Assuming no bugs, I'm not sure why the test from the Jul 25 comment is expected to hang. The client (correctly) sends a RST_STREAM and WINDOW_UPDATE when it closes the response body without reading the full response. The client also sends a WINDOW_UPDATE when it receives DATA for a previously-closed stream. This means the server will have a full flow-control window at the start of each request. Also note that the test uses very large window sizes relative to the tiny 16KB responses in the test (see log snippet below). And, even if the response bodies were larger, the client will usually send RST_STREAM (due to resp.Body.Close()) before the server has a chance to send more than a few KB on the wire.
|
Maybe it does? I forget. Too late for Go 1.9 in any case. I do recall that one of the 4 flow control directions had some omission. |
Go's http2.Server doesn't respect the client's flow control.
It accounts for it partly, and enforces the other direction (that the client can't send too much to the server), but does not ever deduct its own credit when sending DATA frames, and doesn't wait for flow control when doing so.
In the process of fixing #16481 I had expected a test like this to hang:
But it didn't.
Add a test like that back once the http2.Server respects flow control.
The text was updated successfully, but these errors were encountered: