-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[8.x] Backport http2 changes from 10.x #22850
Commits on Oct 16, 2018
-
http2: fix ping duration calculation
PR-URL: nodejs#19956 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 141f166 - Browse repository at this point
Copy the full SHA 141f166View commit details -
doc: close event does not take arguments
Explicitly added in the docs that the close event does not expect any arguments when invoked. Fixes: nodejs#20018 PR-URL: nodejs#20031 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f3f4ee6 - Browse repository at this point
Copy the full SHA f3f4ee6View commit details -
http2: refactor how trailers are done
Rather than an option, introduce a method and an event... ```js server.on('stream', (stream) => { stream.respond(undefined, { waitForTrailers: true }); stream.on('wantTrailers', () => { stream.sendTrailers({ abc: 'xyz'}); }); stream.end('hello world'); }); ``` This is a breaking change in the API such that the prior `options.getTrailers` is no longer supported at all. Ordinarily this would be semver-major and require a deprecation but the http2 stuff is still experimental. PR-URL: nodejs#19959 Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ecc2a70 - Browse repository at this point
Copy the full SHA ecc2a70View commit details -
test: remove message from strictEqual assertions
When an AssertionError happens, the value of headers['set-cookie'] is not reported. That information is useful for debugging. Hence removed the value passed as the message in deepStrictEqual assertions of test/parallel/test-http2-cookies.js PR-URL: nodejs#20174 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8786251 - Browse repository at this point
Copy the full SHA 8786251View commit details -
doc,http2: add parameters for Http2Session:connect event
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20193 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b01edd2 - Browse repository at this point
Copy the full SHA b01edd2View commit details -
test: add strictEqual method to assert
Adds strictEqual method to assert on stream.session.alpnProtocol to verify expected value 'h2'. This changes 'h2' from an assertion error message to the value expected from stream.session.alpnProtocol. PR-URL: nodejs#20189 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19e41a6 - Browse repository at this point
Copy the full SHA 19e41a6View commit details -
doc: add parameters for Http2Session:error event
Add parameters for the callback for the Http2Session:error event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20206 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ac14fec - Browse repository at this point
Copy the full SHA ac14fecView commit details -
doc: improve docs for Http2Session:frameError
Improve documentation regarding the callback parameters for the frameError event for instances of Http2Session, making it inline with the currently accepted structure, like the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20236 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 110ac58 - Browse repository at this point
Copy the full SHA 110ac58View commit details -
http: added aborted property to request
PR-URL: nodejs#20094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for df3e6d9 - Browse repository at this point
Copy the full SHA df3e6d9View commit details -
test: removed assert.strictEqual message
PR-URL: nodejs#20223 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4fbd216 - Browse repository at this point
Copy the full SHA 4fbd216View commit details -
doc: improve parameters for Http2Session:goaway event
Improve parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment)
Configuration menu - View commit details
-
Copy full SHA for d0594df - Browse repository at this point
Copy the full SHA d0594dfView commit details -
http2: fix responses to long payload reqs
When a request with a long payload is received, http2 does not allow a response that does not process all the incoming payload. Add a conditional Http2Stream.close call that runs only if the user hasn't attempted to read the stream. PR-URL: nodejs#20084 Fixes: nodejs#20060 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7bb1a8c - Browse repository at this point
Copy the full SHA 7bb1a8cView commit details -
In case there was no ack, the callback would have returned more than the error as return value. This makes sure that is not the case anymore. PR-URL: nodejs#20311 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cdbf96f - Browse repository at this point
Copy the full SHA cdbf96fView commit details -
test: verify arguments length in common.expectsError
If `common.expectsError` is used as a callback, it will now also verify that there is only one argument (the expected error). PR-URL: nodejs#20311 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 07aab18 - Browse repository at this point
Copy the full SHA 07aab18View commit details -
doc: add parameters for settings events
Add parameters for the callback for the Http2Session:localSettings event and Http2Session:remoteSettings event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20371 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c9865ff - Browse repository at this point
Copy the full SHA c9865ffView commit details -
http2: reduce require calls in http2/core
This commit removes unnecesary requires of http and internal/util in http2/core.js PR-URL: nodejs#20422 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d9efc87 - Browse repository at this point
Copy the full SHA d9efc87View commit details -
http2: rename http2_state class to Http2State
This commit renames the http2_state class to follow the guidelines in CPP_STYLE_GUIDE.md. PR-URL: nodejs#20423 Reviewed-By: Anna Henningsen <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce96ad0 - Browse repository at this point
Copy the full SHA ce96ad0View commit details -
doc: add parameters for Http2Session:stream event
Add parameters for the callback for the Http2Session:stream event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20547 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 807807f - Browse repository at this point
Copy the full SHA 807807fView commit details -
test: fix flaky http2-flow-control test
PR-URL: nodejs#20556 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7d23d63 - Browse repository at this point
Copy the full SHA 7d23d63View commit details -
doc: add params for ClientHttp2Session:altsvc
Add parameters for the callback for the ClientHttp2Session:altsvc event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20598 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e3e16d7 - Browse repository at this point
Copy the full SHA e3e16d7View commit details -
doc: add parameters for Http2Stream:error event
Add parameters for the callback for the Http2Stream:error event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20610 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 776c3d0 - Browse repository at this point
Copy the full SHA 776c3d0View commit details -
http2: avoid bind and properly clean up in compat
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 11f194f - Browse repository at this point
Copy the full SHA 11f194fView commit details -
test: improve reliability of http2-session-timeout
Check actual expired time rather than relying on a number of calls to setTimeout() in test-http2-session-timeout more robust. PR-URL: nodejs#20692 Fixes: nodejs#20628 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9cf40c5 - Browse repository at this point
Copy the full SHA 9cf40c5View commit details -
Adjust http2 behaviour to allow ending a stream even after some data comes in (when the user has no intention of reading that data). Also correctly end a stream when trailers are present. PR-URL: nodejs#20621 Fixes: nodejs#20060 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2238e12 - Browse repository at this point
Copy the full SHA 2238e12View commit details -
net,http2: refactor _write and _writev
Refactor writable part (the _write and _writev functions) in net.Socket and http2.Http2Stream classes. Also involves adding a generic "WriteGeneric" method to the Http2Stream class based on net.Socket._writeGeneric, but behind a symbol. PR-URL: nodejs#20643 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c9f8d6f - Browse repository at this point
Copy the full SHA c9f8d6fView commit details -
PR-URL: nodejs#20843 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4ef2393 - Browse repository at this point
Copy the full SHA 4ef2393View commit details -
http2: fix several serious bugs
Currently http2 does not properly submit GOAWAY frames when a session is being destroyed. It also doesn't properly handle when the other party severs the connection after sending a GOAWAY frame, even though it should. Edge, IE & Safari are currently unable to handle empty TRAILERS frames despite them being correctly to spec. Instead send an empty DATA frame with END_STREAM flag in those situations. Fix and adjust several flaky and/or incorrect tests. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2151bf3 - Browse repository at this point
Copy the full SHA 2151bf3View commit details -
test: fix flaky http2-session-unref
It's possible for the connections to take too long and since the server is already unrefed, the process will just exit. Instead adjust the test so that server unref only happens after all sessions have been successfuly established and unrefed. That still tests the same condition but will not fail under load. PR-URL: nodejs#20772 Fixes: nodejs#20705 Fixes: nodejs#20750 Fixes: nodejs#20850 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e825eed - Browse repository at this point
Copy the full SHA e825eedView commit details -
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 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 830cc57 - Browse repository at this point
Copy the full SHA 830cc57View commit details -
http2: force through RST_STREAM in destroy
If still needed, force through RST_STREAM in Http2Stream#destroy calls, so that nghttp2 can wrap up properly and doesn't continue trying to read & write data to the stream. PR-URL: nodejs#21016 Fixes: nodejs#21008 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 21f3e27 - Browse repository at this point
Copy the full SHA 21f3e27View commit details -
test: minor adjustments to test-http2-respond-file
PR-URL: nodejs#21098 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b53a753 - Browse repository at this point
Copy the full SHA b53a753View commit details -
Check stream._writableState.finished instead of stream.writable as the latter can lead to premature calls to destroy and dropped writes on busy processes. PR-URL: nodejs#21051 Fixes: nodejs#20750 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a34ebd - Browse repository at this point
Copy the full SHA 3a34ebdView commit details -
http2: safer Http2Session destructor
It's hypothetically (and with certain V8 flags) possible for the session to be garbage collected before all the streams are. In that case, trying to remove the stream from the session will lead to a segfault due to attempting to access no longer valid memory. Fix this by unsetting the session on any streams still around when destroying. PR-URL: nodejs#21194 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3d38b99 - Browse repository at this point
Copy the full SHA 3d38b99View commit details -
http2: fix memory leak for uncommon headers
Fix a memory leak that occurs with header names that are short and not present in the static table of default headers. PR-URL: nodejs#21336 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4d46e35 - Browse repository at this point
Copy the full SHA 4d46e35View commit details -
http2: fix memory leak when headers are not emitted
When headers are not emitted to JS, e.g. because of an error before that could happen, we currently still have the vector of previously received headers lying around, each one holding a reference count of 1. To fix the resulting memory leak, release them in the `Http2Stream` destructor. Also, clear the vector of headers once they have been emitted – there’s not need to keep it around, wasting memory. PR-URL: nodejs#21373 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 78c7fc4 - Browse repository at this point
Copy the full SHA 78c7fc4View commit details -
http2: track memory allocated by nghttp2
Provide a custom memory allocator for nghttp2, and track memory allocated by the library with it. This makes the used-memory-per-session estimate more accurate, and allows us to track memory leaks either in nghttp2 itself or, more likely, through faulty usage on our end. It also allows us to make the per-session memory limit more accurate in the future; currently, we are not handling this in an ideal way, and instead let nghttp2 allocate what it wants, even if that goes over our limit. PR-URL: nodejs#21374 Refs: nodejs#21373 Refs: nodejs#21336 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f8ca564 - Browse repository at this point
Copy the full SHA f8ca564View commit details -
doc: Improve doc for Http2 headers object
Add more details regarding processing and data type of incoming headers in Http2. PR-URL: nodejs#21296 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9e64f91 - Browse repository at this point
Copy the full SHA 9e64f91View commit details -
http2: pass incoming set-cookie header as array
Incoming set-cookie headers should be passed to user as array like in http module. Besides improving compatibility between http and http2 it avoids the need to check if the type is an array or not in user code. PR-URL: nodejs#21360 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6bdee91 - Browse repository at this point
Copy the full SHA 6bdee91View commit details -
doc: fix http2stream.pushStream error doc
The old error code `ERR_HTTP2_STREAM_CLOSED` was removed in commit 0babd18 (pull request nodejs#17406), and the testcase for http2stream.pushStream was changed accordingly, but the documentation change was overlooked. This commit fixes it and aligns the documentation with the testcase. This is a part of the fixes hinted by nodejs#21470, which includes some tests for error codes usage and documentation and enforces a stricter format. Refs: nodejs#21470 Refs: nodejs#17406 PR-URL: nodejs#21487 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 00002a6 - Browse repository at this point
Copy the full SHA 00002a6View commit details -
http2: order declarations in core.js
Order declarations: * public modules in alphabetical order * internal modules in alphabetical order * process.binding() calls in alphabetical order * exports in alphabetical order PR-URL: nodejs#21689 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 823b31e - Browse repository at this point
Copy the full SHA 823b31eView commit details -
errors: fix undefined HTTP2 and tls errors
Includes implementation of tls, HTTP2 error with documentation. PR-URL: nodejs#21564 Refs: nodejs#21440 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a9053fa - Browse repository at this point
Copy the full SHA a9053faView commit details -
http2: remove
waitTrailers
listener after closing a streamWhen `writeHeader` of `Http2ServerResponse` instance are called with 204, 205 and 304 status codes an underlying stream closes. If call `end` method after sending any of these status codes it will cause an error `TypeError: Cannot read property 'Symbol(trailers)' of undefined` because a reference to `Http2ServerResponse` instance associated with Http2Stream already was deleted. The closing of stream causes emitting `waitTrailers` event and, when this event handles inside `onStreamTrailerReady` handler, there is no reference to Http2ServerResponse instance. Fixes: nodejs#21740 PR-URL: nodejs#21764 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9a0d117 - Browse repository at this point
Copy the full SHA 9a0d117View commit details -
doc: add missing
require
to example in http2.mdPR-URL: nodejs#21858 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 41edcf4 - Browse repository at this point
Copy the full SHA 41edcf4View commit details -
http2: remove unused nghttp2 error list
Remove a list of HTTP2 errors as well as `nghttp2_errname()` that converted an integer nghttp2 error code to a string representation. We already use `nghttp2_strerror()` for this, which is provided by nghttp2 returns a better error string anyway. PR-URL: nodejs#21827 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d78a7b3 - Browse repository at this point
Copy the full SHA d78a7b3View commit details -
http2: release request()'s "connect" event listener after it runs
The `Http2Session#request()` method internally listens to the "connect" event if the session has not yet established a connection so that the actual request can be sent after the connection has been established. This commit removes the event listener after it runs and carries out the request and is no longer needed. In practice this shouldn't affect the behavior of the session object since the "connect" event fires only once anyway, but removing the listener releases its references. The rest of this class subscribes to the "connect" event with `once` instead of `on` as well. Tested by adding a new test that ensures `Http2Session#request()` is called before the connection is established, indicated by a "connect" listener that is run. The test also ensures all "connect" listeners are removed after the connection is established. PR-URL: nodejs#21916 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aa4c19b - Browse repository at this point
Copy the full SHA aa4c19bView commit details -
test: refactor test-http2-compat-serverresponse-finished.js
PR-URL: nodejs#21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 833ef17 - Browse repository at this point
Copy the full SHA 833ef17View commit details -
test: improve reliability in http2-session-timeout
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: nodejs#20628 PR-URL: nodejs#22026 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 23b53e7 - Browse repository at this point
Copy the full SHA 23b53e7View commit details -
http2: remove
streamError
from docs`streamError` was removed quite some time ago but the docs and code comments weren't updated. Fix that. Fixes: nodejs#20211 PR-URL: nodejs#22246 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 07ef45d - Browse repository at this point
Copy the full SHA 07ef45dView commit details -
doc: clarify http2 docs around class exports
PR-URL: nodejs#22247 Fixes: nodejs#21434 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: George Adams <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 411acb7 - Browse repository at this point
Copy the full SHA 411acb7View commit details -
http2: avoid race condition in OnHeaderCallback
Fixes: nodejs#21416 PR-URL: nodejs#22256 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee3e471 - Browse repository at this point
Copy the full SHA ee3e471View commit details -
test: add test-http2-large-file sequential test
Refs: nodejs#19141 PR-URL: nodejs#22254 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 81f3ebc - Browse repository at this point
Copy the full SHA 81f3ebcView commit details -
http2: explicitly disallow nested push streams
Fixes: nodejs#19095 PR-URL: nodejs#22245 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f1e310e - Browse repository at this point
Copy the full SHA f1e310eView commit details -
http2: emit timeout on compat request and response
v8.x Backport Note: The timeout has been increased to 10ms. Fixes: nodejs#20079 PR-URL: nodejs#22252 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3dc84ca - Browse repository at this point
Copy the full SHA 3dc84caView commit details -
doc: make createPushResponse() more detailled
We don't know what will return when successful or failure for the callback of the function. So this commit makes it more detailled. PR-URL: nodejs#22366 Refs: nodejs#22322 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 28cd408 - Browse repository at this point
Copy the full SHA 28cd408View commit details -
doc: simplify http2 wording and formatting
Remove `It is important to note that` and italics from `waitForTrailers` sentences. PR-URL: nodejs#22541 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 391e30a - Browse repository at this point
Copy the full SHA 391e30aView commit details -
http2: throw better error when accessing unbound socket proxy
Fixes: nodejs#22268 PR-URL: nodejs#22486 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3640568 - Browse repository at this point
Copy the full SHA 3640568View commit details -
deps: update to nghttp2 1.33.0
Refs: https://github.com/nghttp2/nghttp2/releases/tag/v1.33.0 PR-URL: nodejs#22649 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f6d9bf3 - Browse repository at this point
Copy the full SHA f6d9bf3View commit details -
http2: don't expose the original socket through the socket proxy
Refs: nodejs#22486 PR-URL: nodejs#22650 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 62ce017 - Browse repository at this point
Copy the full SHA 62ce017View commit details -
New default timeout values of "2 minutes" were added into documentation inside 2 classes under "Event: 'timeout'": 1) Class: Http2SecureServer 2) Class: Http2Server New sections for `.setTimeout()` method were added inside `Http2SecureServer` & `Http2Server` docs. PR-URL: nodejs#22798 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f9cd2d5 - Browse repository at this point
Copy the full SHA f9cd2d5View commit details -
http2: add http2stream.endAfterHeaders property
Indicates is the END_STREAM flag was set on the received HEADERS frame PR-URL: nodejs#22843 Fixes: nodejs#22497 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 565d9d8 - Browse repository at this point
Copy the full SHA 565d9d8View commit details -
http2: check if stream is not destroyed before sending trailers
Fixes: nodejs#22855 PR-URL: nodejs#22896 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2fd285a - Browse repository at this point
Copy the full SHA 2fd285aView commit details -
http2: add origin frame support
v8.x Backport Note -- as V8 doesn't expose an overload of String::WriteOneByte in Node 8 that accepts an isolate argument, the Origins constructor has been changed to not accept an isolate. PR-URL: nodejs#22956 Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bdaccc9 - Browse repository at this point
Copy the full SHA bdaccc9View commit details -
http2: do not falsely emit 'aborted' on push
A push stream should have its writable side closed upon receipt, to avoid emitting the 'aborted' event when the readable side is closed. PR-URL: nodejs#22878 Fixes: nodejs#22851 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 48d8766 - Browse repository at this point
Copy the full SHA 48d8766View commit details -
Add a `Http2Session` event whenever a non-ack `PING` is received. Fixes: nodejs#18514 PR-URL: nodejs#23009 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 40a8814 - Browse repository at this point
Copy the full SHA 40a8814View commit details -
test: remove setImmediate from timeout test
In test-http2-session-timeout, setImmediate() is used to wrap makeReq(). makeReq() is asynchronous and setImmediate() is not necessary. PR-URL: nodejs#23058 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 593f8d9 - Browse repository at this point
Copy the full SHA 593f8d9View commit details -
test: improve debugging information for http2 test
In test-http2-session-timeout, provide the number of requests that occurred when the test fails. PR-URL: nodejs#23058 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4f46d4b - Browse repository at this point
Copy the full SHA 4f46d4bView commit details -
http2: graduate from experimental
PR-URL: nodejs#22466 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19e925b - Browse repository at this point
Copy the full SHA 19e925bView commit details