-
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
[v8.x backport] backport 17338, 18186, 18358, 18546 #19191
[v8.x backport] backport 17338, 18186, 18358, 18546 #19191
Commits on May 2, 2018
-
http2: add http fallback options to .createServer
This adds the Http1IncomingMessage and Http1ServerReponse options to http2.createServer(). Backport-PR-URL: nodejs#20456 PR-URL: nodejs#15752 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Configuration menu - View commit details
-
Copy full SHA for 58478d8 - Browse repository at this point
Copy the full SHA 58478d8View commit details -
http: add options to http.createServer()
This adds the optional options argument to `http.createServer()`. It contains two options: the `IncomingMessage` and `ServerReponse` option. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#15752 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Configuration menu - View commit details
-
Copy full SHA for 5ea29ef - Browse repository at this point
Copy the full SHA 5ea29efView commit details -
http2: add req and res options to server creation
Add optional Http2ServerRequest and Http2ServerResponse options to createServer and createSecureServer. Allows custom req & res classes that extend the default ones to be used without overriding the prototype. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#15560 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Configuration menu - View commit details
-
Copy full SHA for ae2ebde - Browse repository at this point
Copy the full SHA ae2ebdeView commit details -
http2: use
_final
instead ofon('finish')
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18609 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Configuration menu - View commit details
-
Copy full SHA for 28a2729 - Browse repository at this point
Copy the full SHA 28a2729View commit details -
doc: warn against concurrent http2stream.respondWithFD
Upcoming changes to move away from synchronous I/O on the main thread will imply that using the same file descriptor to respond on multiple HTTP/2 streams at the same time is invalid, because at least on Windows `uv_fs_read()` is race-y. Therefore, warn against such usage. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18762 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8b234f5 - Browse repository at this point
Copy the full SHA 8b234f5View commit details -
src: add nullptr check for session in DEBUG macro
Currenlty when configuring --debug-http2 /test/parallel/test-http2-getpackedsettings.js will segment fault: $ out/Debug/node test/parallel/test-http2-getpackedsettings.js Segmentation fault: 11 This is happening because the settings is created with the Environment in PackSettings: Http2Session::Http2Settings settings(env); This will cause the session to be set to nullptr. When the init function is later called the expanded DEBUG_HTTP2SESSION macro will cause the segment fault when the session is dereferenced. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18815 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c6a9abd - Browse repository at this point
Copy the full SHA c6a9abdView commit details -
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18872 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Configuration menu - View commit details
-
Copy full SHA for d85e5f4 - Browse repository at this point
Copy the full SHA d85e5f4View commit details -
deps,src: align ssize_t ABI between Node & nghttp2
Previously, we performed casts that are considered undefined behavior. Instead, just define `ssize_t` for nghttp2 the same way we define it for the rest of Node. Also, remove a TODO comment that would probably also be *technically* correct but shouldn’t matter as long as nobody is complaining. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18565 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 55cf145 - Browse repository at this point
Copy the full SHA 55cf145View commit details -
http2: fix condition where data is lost
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18895 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for b1d95ec - Browse repository at this point
Copy the full SHA b1d95ecView commit details -
http2: send error text in case of ALPN mismatch
Send a human-readable HTTP/1 response in case of an unexpected ALPN protocol. This helps with debugging this condition, since previously the only result of it would be a closed socket. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18986 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 1029369 - Browse repository at this point
Copy the full SHA 1029369View commit details -
http2: use original error for cancelling pending streams
Previously, if `session.destroy()` was called with an error object, the information contained in it would be discarded and a generic `ERR_HTTP2_STREAM_CANCEL` would be used for all pending streams. Instead, make the information from the original error object available. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18988 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 0379350 - Browse repository at this point
Copy the full SHA 0379350View commit details -
http2: fix endless loop when writing empty string
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18924 Fixes: nodejs#18169 Refs: nodejs#18673 Refs: https://github.com/nodejs/node/blob/v9.5.0/src/node_http2.cc#L1481-L1484 Refs: https://github.com/nodejs/node/blob/v9.5.0/lib/_http_outgoing.js#L659-L661 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 1f3ab4f - Browse repository at this point
Copy the full SHA 1f3ab4fView commit details -
test: check endless loop while writing empty string
Refs: nodejs#18673 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18924 Refs: nodejs#18673 Refs: https://github.com/nodejs/node/blob/v9.5.0/src/node_http2.cc#L1481-L1484 Refs: https://github.com/nodejs/node/blob/v9.5.0/lib/_http_outgoing.js#L659-L661 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 199d9a5 - Browse repository at this point
Copy the full SHA 199d9a5View commit details -
http2: fix flaky test-http2-https-fallback
The test was flaky because it relied on a specific order of asynchronous operation that were fired paralellely. This was true on most platform and conditions, but not all the time. See: nodejs#18986 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19093 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Configuration menu - View commit details
-
Copy full SHA for 10aaa74 - Browse repository at this point
Copy the full SHA 10aaa74View commit details -
http2: no stream destroy while its data is on the wire
This fixes a crash that occurred when a `Http2Stream` write is completed after it is already destroyed. Instead, don’t destroy the stream in that case and wait for GC to take over. Backport-PR-URL: nodejs#19185 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19002 Fixes: nodejs#18973 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Configuration menu - View commit details
-
Copy full SHA for f165e9f - Browse repository at this point
Copy the full SHA f165e9fView commit details -
doc: add note about browsers and HTTP/2
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19476 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8daddfb - Browse repository at this point
Copy the full SHA 8daddfbView commit details -
http2: remove some unnecessary next ticks
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19451 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0137eb7 - Browse repository at this point
Copy the full SHA 0137eb7View commit details -
Previously, "HTTP/2" was strictly used to describe the protocol, and HTTP2 the module. This distinction is deemed unnecessary, and consistency between the two terms is enforced. Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19603 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8f55971 - Browse repository at this point
Copy the full SHA 8f55971View commit details -
test: http2 stream.respond() error checks
Backport-PR-URL: nodejs#19579 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18861 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9c7bf7f - Browse repository at this point
Copy the full SHA 9c7bf7fView commit details -
http2: destroy() stream, upon errnoException
First steps towards nodejs#19060 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19389 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 519b063 - Browse repository at this point
Copy the full SHA 519b063View commit details -
doc: guard against md list parsing edge case
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19647 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 22eddf1 - Browse repository at this point
Copy the full SHA 22eddf1View commit details -
test: http2 errors on req.close()
Backport-PR-URL: nodejs#19579 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#18854 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f5a2cd5 - Browse repository at this point
Copy the full SHA f5a2cd5View commit details -
http2: callback valid check before closing request
Do not close the request if callback is not a function, and throw ERR_INVALID_CALLBACK TypeError Backport-PR-URL: nodejs#19229 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19061 Fixes: nodejs#18855 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Configuration menu - View commit details
-
Copy full SHA for af7c7cb - Browse repository at this point
Copy the full SHA af7c7cbView commit details -
doc, http2: add sections for server.close()
Clarify current behavior of http2server.close() and http2secureServer.close() w.r.t. perceived differences when compared with httpServer.close(). Fixes: nodejs#19711 Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19802 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3a890a8 - Browse repository at this point
Copy the full SHA 3a890a8View commit details -
doc: add Http2Session.connecting property
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19842 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Configuration menu - View commit details
-
Copy full SHA for 4dc0b3c - Browse repository at this point
Copy the full SHA 4dc0b3cView commit details -
http2: emit session connect on next tick
Backport-PR-URL: nodejs#20456 PR-URL: nodejs#19842 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Configuration menu - View commit details
-
Copy full SHA for c83098a - Browse repository at this point
Copy the full SHA c83098aView commit details -
src: expose uv.errmap to binding
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: nodejs#17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for 1f35b8f - Browse repository at this point
Copy the full SHA 1f35b8fView commit details -
util: implement util.getSystemErrorName()
Reimplement uv.errname() as internal/util.getSystemErrorName() to avoid the memory leaks caused by unknown error codes and avoid calling into C++ for the error names. Also expose it as a public API for external use. PR-URL: nodejs#18186 Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Configuration menu - View commit details
-
Copy full SHA for d501138 - Browse repository at this point
Copy the full SHA d501138View commit details -
errors: lazy load util in internal/errors.js
PR-URL: nodejs#18358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
Configuration menu - View commit details
-
Copy full SHA for a3754e7 - Browse repository at this point
Copy the full SHA a3754e7View commit details -
util: skip type checks in internal getSystemErrorName
PR-URL: nodejs#18546 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2179547 - Browse repository at this point
Copy the full SHA 2179547View commit details -
errors: move error creation helpers to errors.js
This commit moves error creation helpers scattered around under lib/ into lib/internal/errors.js in the hope of being clearer about the differences of errors that we throw into the user land. - Move util._errnoException and util._exceptionWithHostPort into internal/errors.js and simplify their logic so it's clearer what the properties these helpers create. - Move the errnoException helper in dns.js to internal/errors.js into internal/errors.js and rename it to dnsException. Simplify it's logic so it no longer calls errnoException and skips the unnecessary argument checks. PR-URL: nodejs#18546 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d8b637f - Browse repository at this point
Copy the full SHA d8b637fView commit details -
errors: make message non-enumerable
A error message should always be non-enumerable. This makes sure that is true for dns errors as well. It also adds another check in `common.expectsError` to make sure no other regressions are introduced going forward. Fixes nodejs#19716 PR-URL: nodejs#19719 Fixes: nodejs#19716 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 74e3b14 - Browse repository at this point
Copy the full SHA 74e3b14View commit details