- Oct 17, 2018
-
-
James M Snell authored
v8.x Backport Note: The timeout has been increased to 10ms. Fixes: https://github.com/nodejs/node/issues/20079 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22252 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
James M Snell authored
Fixes: https://github.com/nodejs/node/issues/19095 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22245 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
James M Snell authored
Refs: https://github.com/nodejs/node/issues/19141 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22254 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
George Adams <george.adams@uk.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
James M Snell authored
Fixes: https://github.com/nodejs/node/issues/21416 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22256 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
George Adams <george.adams@uk.ibm.com>
-
James M Snell authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22247 Fixes: https://github.com/nodejs/node/issues/21434 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
George Adams <george.adams@uk.ibm.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
James M Snell authored
`streamError` was removed quite some time ago but the docs and code comments weren't updated. Fix that. Fixes: https://github.com/nodejs/node/issues/20211 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22246 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Rich Trott authored
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: https://github.com/nodejs/node/issues/20628 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/22026 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Anto Aravinth authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21929 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
James Ide authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21916 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Anna Henningsen authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21827 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Kevin Simper authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21858 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
RidgeA authored
When `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: https://github.com/nodejs/node/issues/21740 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21764 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
Shailesh Shekhawat authored
Includes implementation of tls, HTTP2 error with documentation. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21564 Refs: https://github.com/nodejs/node/issues/21440 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
Rich Trott authored
Order declarations: * public modules in alphabetical order * internal modules in alphabetical order * process.binding() calls in alphabetical order * exports in alphabetical order Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21689 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Weijia Wang <starkwang@126.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Сковорода Никита Андреевич authored
The old error code `ERR_HTTP2_STREAM_CLOSED` was removed in commit 0babd181 (pull request #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 #21470, which includes some tests for error codes usage and documentation and enforces a stricter format. Refs: https://github.com/nodejs/node/pull/21470 Refs: https://github.com/nodejs/node/pull/17406 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21487 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Gerhard Stoebich authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21360 Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Gerhard Stoebich authored
Add more details regarding processing and data type of incoming headers in Http2. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21296 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com>
-
Anna Henningsen authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21374 Refs: https://github.com/nodejs/node/pull/21373 Refs: https://github.com/nodejs/node/pull/21336 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-
Anna Henningsen authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21373 Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-
Anna Henningsen authored
Fix a memory leak that occurs with header names that are short and not present in the static table of default headers. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21336 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-
Anatoli Papirovski authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21194 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com>
-
Anatoli Papirovski authored
Check stream._writableState.finished instead of stream.writable as the latter can lead to premature calls to destroy and dropped writes on busy processes. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21051 Fixes: https://github.com/nodejs/node/issues/20750 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21098 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Anatoli Papirovski authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/21016 Fixes: https://github.com/nodejs/node/issues/21008 Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Anatoli Papirovski authored
Delay automatically closing the stream with setImmediate in order to allow any pushStreams to be sent first. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20997 Fixes: https://github.com/nodejs/node/issues/20992 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anatoli Papirovski authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20772 Fixes: https://github.com/nodejs/node/issues/20705 Fixes: https://github.com/nodejs/node/issues/20750 Fixes: https://github.com/nodejs/node/issues/20850 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anatoli Papirovski authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20772 Fixes: https://github.com/nodejs/node/issues/20705 Fixes: https://github.com/nodejs/node/issues/20750 Fixes: https://github.com/nodejs/node/issues/20850 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Keita Akutsu authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20843 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de>
-
Ujjwal Sharma authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20643 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Anatoli Papirovski authored
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. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20621 Fixes: https://github.com/nodejs/node/issues/20060 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Rich Trott authored
Check actual expired time rather than relying on a number of calls to setTimeout() in test-http2-session-timeout more robust. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20692 Fixes: https://github.com/nodejs/node/issues/20628 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Robert Nagy authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20374 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Ujjwal Sharma authored
Add parameters for the callback for the Http2Stream:error event inline with the pattern in the rest of the documentation. Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20610 Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Ujjwal Sharma authored
Add parameters for the callback for the ClientHttp2Session:altsvc event inline with the pattern in the rest of the documentation. Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20598 Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anatoli Papirovski authored
Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20556 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Ujjwal Sharma authored
Add parameters for the callback for the Http2Session:stream event inline with the pattern in the rest of the documentation. Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20547 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Daniel Bevenius authored
This commit renames the http2_state class to follow the guidelines in CPP_STYLE_GUIDE.md. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20423 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Daniel Bevenius authored
This commit removes unnecesary requires of http and internal/util in http2/core.js Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20422 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Ujjwal Sharma authored
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: https://github.com/nodejs/help/issues/877#issuecomment-381253464 Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20371 Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Ruben Bridgewater authored
If `common.expectsError` is used as a callback, it will now also verify that there is only one argument (the expected error). Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/20311 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-