-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
http2: delay closing stream #20997
http2: delay closing stream #20997
Conversation
Delay automatically closing the stream with setImmediate in order to allow any pushStreams to be sent first.
ping @nodejs/http2 would like to get this in the next release. |
@@ -2178,7 +2181,7 @@ class ServerHttp2Stream extends Http2Stream { | |||
let headRequest = false; | |||
if (headers[HTTP2_HEADER_METHOD] === HTTP2_METHOD_HEAD) | |||
headRequest = options.endStream = true; | |||
options.readable = !options.endStream; | |||
options.readable = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasnell I remember we discussed this, and you had a very good reason why this was there. Can you please weight in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this extensively and I couldn't see a good reason. We (or nghttp2) don't let through any data from the other side as is anyway, so making the readable side open doesn't seem to make much sense... Would definitely love to know if there's something I missed though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am recalling correctly, this was there because of an earlier iteration. I don't think this is necessary now.
ping @jasnell — would appreciate your review, in particular whether we're safe to set |
Landed in 87cd389 |
Delay automatically closing the stream with setImmediate in order to allow any pushStreams to be sent first. PR-URL: nodejs#20997 Fixes: nodejs#20992 Reviewed-By: James M Snell <jasnell@gmail.com>
Delay automatically closing the stream with setImmediate in order to allow any pushStreams to be sent first. PR-URL: nodejs#20997 Fixes: nodejs#20992 Reviewed-By: James M Snell <jasnell@gmail.com>
Delay automatically closing the stream with setImmediate in order to allow any pushStreams to be sent first. PR-URL: nodejs#20997 Fixes: nodejs#20992 Reviewed-By: James M Snell <jasnell@gmail.com>
Delay automatically closing the stream with setImmediate in order to allow any pushStreams to be sent first. Also disable the
readable
side of thepushStream
since there should never be any data incoming.I'm not able to make a test since technically what we were doing was fine (and works with our own client) but the browsers seem a bit too strict.
Fixes: #20992
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes