-
Notifications
You must be signed in to change notification settings - Fork 186
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
Problem with sending large responses #18
Comments
Could you try it with logging enabled and with pulling today's updates from git? I've just committed a few improvement to flow control. The appropriate command would be:
(it should put out lots of JSON based log messages, see logging section in README) |
This is probably the handling of incoming WINDOW_UPDATE in half-closed (remote) state. |
Yeah, you're right, that's probably an incoming HEADERS+END_STREAM followed by an incoming WINDOW_UPDATE followed by an outgoing DATA. The spec says:
So the WINDOW_UDPATE should not be accepted, but flow control should be disabled when the stream gets into "half-closed (remote)" state. Another work item is to handle this with STREAM_CLOSED error code. |
Or did I misunderstand the text? For the second reading, it says that we don't have to do flow control in the other direction, since the peer won't send more data anyway... |
see also httpwg/http2-spec#206 the spec basically needed to be loosened. WINDOW_UPDATE after even full close is always going to be possible unless you require a RTT based ACK of END_STREAM to transition to close (which we really don't want). So imo basically just ignore the update if you aren't sending on the stream anymore (but not if it is in half-closed-remote). |
Thanks for the reference and the clarification! |
@shigeki can you confirm this is fixed? |
@molnarg Sorry for my late reply. I'm back to work today. I tried to test this at the latest master and found that the issue was fixed. My test was intended to check if a flow control works fine with my client but I found today that node-http2 sends initial settings to disable the flow control together with a initial window size as below. Is it intended to implement the flow control in future?
|
OK, thanks for the confirmation. The reason why SETTINGS_INITIAL_WINDOW_SIZE is sent along with SETTINGS_FLOW_CONTROL_OPTIONS is that SETTINGS_INITIAL_WINDOW_SIZE is mandatory according to the spec! I plan to implement a simple flow control algorithm in the coming days, and the progress will be tracked in #28. Until that is done, I would recommend testing with nghttp, it implements flow control properly. |
I tried this test of node-http2 as a SSL server with NPN. I think that SETTINGS_INITIAL_WINDOW_SIZE and SETTINGS_MAX_CONCURRENT_STREAMS are only necessary in a HTTP2-Settings header sent by a client. as described in "3.2.1. HTTP2-Settings Header Field" and they are not mandatory sent by a server with NPN. Did I miss something? |
I'm aware that httpwg/http2-spec#150 is in the issue lists but it has not been commited yet. |
You're right, I though it was necessary all the time. Will remove for now, and add back when the next draft comes out (if it makes these mandatory). |
As reported by @shigeki in #15:
The text was updated successfully, but these errors were encountered: