James M Snell
d0c0e20bc2
test: refactoring / cleanup on child-process tests
...
PR-URL: https://github.com/nodejs/node/pull/32078
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-24 11:21:00 -07:00
Robert Nagy
eeccd52b4e
net: make readable/writable start as true
...
`net.Socket` is slightly breaking stream invariants by
having readable/writable going from `false` to `true`.
Streams assume that readable/writable starts out `true`
and then goes to `false` through `push(null)`/`end()`
after which it never goes back to `true`, e.g. once a
stream is `writable == false` it is assumed it will
never become `true`.
This PR changes 2 things:
Unless explicitly set to `false` through options:
- starts as `readable`/`writable` `true` by default.
- uses `push(null)`/`end()` to set `readable`/`writable`
to `false`. Note that this would cause the socket to
emit the `'end'`/`'finish'` events, which it did not
do previously.
In the case it is explicitly set to `false` through
options` it is assumed to never become `true`.
PR-URL: https://github.com/nodejs/node/pull/32272
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-24 09:45:25 +01:00
Rich Trott
96f06e6482
test: use mustCall in place of countdown in timers test
...
Use common.mustCall() in place of countdown in
test-timers-immediate-unref.
PR-URL: https://github.com/nodejs/node/pull/32416
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-23 22:54:13 -07:00
Anna Henningsen
f2cc28aec3
test: use InitializeNodeWithArgs in cctest
...
Refs: https://github.com/nodejs/node/commit/d7f11077f15f52a2db191d3a5bcc41581cb7361f
Fixes: https://github.com/nodejs/node/issues/30257
PR-URL: https://github.com/nodejs/node/pull/32406
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-23 10:59:49 -07:00
Sam Roberts
6b5f82d7f8
test: end tls connection with some data
...
In openssl-1.1.1e the client doesn't seem to like having the TLS
connection shut down with no data sent, so send an empty string. A
number of related issues showed up in the TLS1.3 port, so this is
not entirely surprising.
PR-URL: https://github.com/nodejs/node/pull/32328
Fixes: https://github.com/nodejs/node/issues/32210
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-23 07:37:40 -07:00
Hassaan Pasha
3d0f2257be
test: discard data received by client
...
This test was timing out after update to OpenSSL-1.1.1e.
PR-URL: https://github.com/nodejs/node/pull/32328
Fixes: https://github.com/nodejs/node/issues/32210
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-23 07:37:35 -07:00
Jan Krems
07a1fb953e
module: add hook for global preload code
...
PR-URL: https://github.com/nodejs/node/pull/32068
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2020-03-23 08:39:37 -05:00
Rich Trott
ecfb7b0988
test: replace countdown with Promise.all() in cluster-net-listen tests
...
PR-URL: https://github.com/nodejs/node/pull/32381
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-21 21:52:03 -07:00
Rich Trott
7d4dedbf6a
test: replace Map with Array in cluster-net-listen tests
...
PR-URL: https://github.com/nodejs/node/pull/32381
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-21 21:51:59 -07:00
Michaël Zasso
d23eed256b
src: remove calls to deprecated ArrayBuffer methods
...
v8::ArrayBuffer::IsExternal and v8::ArrayBuffer::Externalize are
no longer necessary.
PR-URL: https://github.com/nodejs/node/pull/32358
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2020-03-21 12:00:57 +01:00
Anna Henningsen and Joyee Cheung
2061c33670
test: add extended embedder cctest
...
Add an embedder cctest that also covers a multi-Environment situation,
including worker_threads-style inspector support.
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-21 10:58:28 +01:00
Anna Henningsen
43d32b073f
src,test: add full-featured embedder API test
...
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-21 10:58:23 +01:00
Anna Henningsen
2561484dcb
test: re-enable cctest that was commented out
...
Refs: https://github.com/nodejs/node/pull/31910
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-21 10:57:29 +01:00
Anna Henningsen
7dead8440c
src: add LoadEnvironment() variant taking a string
...
Allow passing a string as the main module rather than using
the callback variant.
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-21 10:57:26 +01:00
Anna Henningsen
c44edec4da
src: provide a variant of LoadEnvironment taking a callback
...
This allows embedders to flexibly control how they start JS code
rather than using `third_party_main`.
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-21 10:57:23 +01:00
Anna Henningsen
a9fb51f9be
src: align worker and main thread code with embedder API
...
This addresses some long-standing TODOs by Joyee and me about
making the embedder API more powerful and us less reliant on
internal APIs for creating the main thread and Workers.
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-21 10:57:20 +01:00
Xu Meng
b891e9348b
test: uv_tty_init returns EBADF on IBM i
...
When TTY initialization failed, uv_tty_init returned EBADF on IBM i
PASE, rather than EINVAL
PR-URL: https://github.com/nodejs/node/pull/32338
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-03-20 10:21:48 -04:00
Anna Henningsen
95e3733532
cli: allow --huge-max-old-generation-size in NODE_OPTIONS
...
PR-URL: https://github.com/nodejs/node/pull/32251
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-03-20 14:22:18 +01:00
Robert Nagy
a9401439c7
zlib: align with streams
...
- Ensure automatic destruction only happens after both
'end' and 'finish' has been emitted through autoDestroy.
- Ensure close() callback is always invoked.
- Ensure 'error' is only emitted once.
PR-URL: https://github.com/nodejs/node/pull/32220
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-19 10:56:45 +01:00
Clemens Backes
52944b834a
test: remove test
...
PR-URL: https://github.com/nodejs/node/pull/32116
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-18 16:37:20 -07:00
Matheus Marchini
119fdf6813
test: remove checks for deserializing wasm
...
V8 is removing support for serializing wasm modules via the value
serializer. Once this is complete (https://crrev.com/c/2013110 ), we can
re-add this test.
PR-URL: https://github.com/nodejs/node/pull/32116
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-18 16:37:20 -07:00
cjihrig
17a6def4e8
deps: update V8 dtrace & postmortem metadata
...
PR-URL: https://github.com/nodejs/node/pull/32116
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-18 16:23:32 -07:00
Gus Caplan
7a742ec050
lib: add option to disable __proto__
...
Adds `--disable-proto` CLI option which can be set to `delete` or
`throw`.
Fixes #31951
PR-URL: https://github.com/nodejs/node/pull/32279
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
2020-03-18 10:22:42 -07:00
Robert Nagy
a9270dcbeb
http: don't emit 'finish' after 'error'
...
PR-URL: https://github.com/nodejs/node/pull/32276
Refs: https://github.com/nodejs/node/issues/28710
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-03-18 13:09:26 +01:00
Rich Trott
1a3c7473ec
test: use Promise.all() in test-hash-seed
...
We have several tests where a number of asynchronous processes need to
finish before some checks happen. These are done in a number of ways,
including (as here) using our Countdown testing module. I think
Promise.all() may be the idiomatic and ergonomic way to go for a lot of
these tests. Using this one to get feedback on the idea.
PR-URL: https://github.com/nodejs/node/pull/32273
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2020-03-17 18:29:56 -07:00
cjihrig
c788964a75
errors: drop pronouns from ERR_WORKER_PATH message
...
This commit drops pronouns from the ERR_WORKER_PATH message,
and also shortens the text a bit.
PR-URL: https://github.com/nodejs/node/pull/32285
Refs: https://github.com/nodejs/node/pull/31664
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-17 13:27:16 -07:00
Sam Roberts
8cbbc70fbc
src,cli: support compact (one-line) JSON reports
...
Multi-line JSON is more human readable, but harder for log aggregators
to consume, they usually require a log message per line, particularly
for JSON. Compact output will be consumable by aggregators such as EFK
(Elastic Search-Fluentd-Kibana), LogDNA, DataDog, etc.
PR-URL: https://github.com/nodejs/node/pull/32254
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-03-17 08:42:41 -07:00
Robert Nagy
9b20b5db7b
stream: don't emit 'finish' after 'error'
...
PR-URL: https://github.com/nodejs/node/pull/32275
Refs: https://github.com/nodejs/node/issues/28710
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-17 14:49:49 +01:00
Michael Dawson
e063ebd337
n-api: fix comment on expected N-API version
...
Remove the comment about the expected version so
that it does not get out of sync. The code shows
the expected version anyway.
Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com >
PR-URL: https://github.com/nodejs/node/pull/32236
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-16 16:48:30 -04:00
Matheus Marchini
2e3dc12ebd
test: workaround for V8 8.1 inspector pause issue
...
`test-inspector-multisession-ws` and `test-inspector-break-when-eval`
will be affected by an upstream bug when we upgrade V8 to 8.1. The bug
is caused when the Inspector sets a pause at the start of a function
compiled with `CompileFunctionInContext`, but that function hasn't been
executed yet.
On both tests, this issue is triggered by pausing while in C++ executing
LookupAndCompile, which is called by requiring internal modules while
running `console.log`. To eliminate this issue in both tests, we add an
extra `console.log` to ensure we only pause we required all internal
modules we need. On `test-inspector-break-when-eval`, we also need to
start the child process with `--inspect-brk` instead of `--inspect` to
ensure the test is predictable (this test would occasianlly fail on
slower machines, when console.log doesn't run fast enough to finish
after emitting `Runtime.consoleAPICalled` and before the parent process
sending `Runtime.evaluate` message.
Ref: https://bugs.chromium.org/p/v8/issues/detail?id=10287
PR-URL: https://github.com/nodejs/node/pull/32234
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=10287
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-03-16 00:23:53 +00:00
cjihrig
9d1a3b6f60
doc,lib,src,test: make --experimental-report a nop
...
This commit makes the --experimental-report CLI flag a no-op.
PR-URL: https://github.com/nodejs/node/pull/32242
Fixes: https://github.com/nodejs/node/issues/26293
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-15 13:29:34 -04:00
cjihrig
4c64e7c59a
test: remove common.skipIfReportDisabled()
...
The report feature won't ever be disabled moving forward, so
checking for its existence in the tests is no longer needed.
PR-URL: https://github.com/nodejs/node/pull/32242
Fixes: https://github.com/nodejs/node/issues/26293
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-15 13:29:34 -04:00
cjihrig
765c3759ef
build: make --without-report a no-op
...
This commit makes the configure --without-report flag a no-op.
This commit also updates a test that depends on the report CLI
flags being conditionally present.
PR-URL: https://github.com/nodejs/node/pull/32242
Fixes: https://github.com/nodejs/node/issues/26293
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-15 13:29:34 -04:00
Matheus Marchini
86f146a2c0
test: make test-memory-usage predictable
...
The current test relies on undeterministic behavior from V8 GC, and on
newer versions of V8 this test ocasionally fails because that behavior
changed. Prevent that from happening using --predictable-gc-schedule.
If this test fails in the future, it should fail consistently instead of
ocasionally, which should help debug.
Ref: https://github.com/nodejs/node-v8/issues/144#issuecomment-597945219
Signed-off-by: Matheus Marchini <mmarchini@netflix.com >
PR-URL: https://github.com/nodejs/node/pull/32239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-03-15 10:40:15 +05:30
cjihrig
ec204d86b0
test: verify that WASI errors are rethrown
...
This commit adds a test to verify that exceptions thrown from a
WASI application are properly caught and rethrown. This also
gets the code coverage in lib/wasi.js back to 100%.
PR-URL: https://github.com/nodejs/node/pull/32157
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-13 18:18:15 -04:00
Anna Henningsen
605615e5f3
esm: port loader code to JS
...
There is no reason for this to be in C++. Using JavaScript means that
the code is more accessible to more developers, which is important
for any Node.js feature. This also simplifies the code significantly
in some areas. On the technical side, this potentially also enables
making some of the file system operations that are involved
asynchronous.
PR-URL: https://github.com/nodejs/node/pull/32201
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-03-13 17:34:43 +01:00
Harshitha KP and Gireesh Punathil
16cce385c0
test: add new scenario for async-local storage
...
Add a new scenario of multiple clients sharing a single data
callback function managing their response data through
AsyncLocalStorage APIs
Refs: https://github.com/nodejs/node/pull/32063
Refs: https://github.com/nodejs/node/issues/32060
Refs: https://github.com/nodejs/node/issues/32062#issuecomment-593957787
Co-authored-by: Gireesh Punathil <gpunathi@in.ibm.com >
PR-URL: https://github.com/nodejs/node/pull/32082
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-13 15:07:47 +01:00
Harshitha KP
4fedb702b2
test: use portable EOL
...
The test wanted to cut huge string into 1KB strings,
for which a new line character was inserted at appropriate
places. The value is different in Windows (10, 13).
Make it portable, by making use of os.EOL semantics
Refs: https://github.com/nodejs/node/issues/25988
PR-URL: https://github.com/nodejs/node/pull/32104
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-13 10:51:54 +01:00
Antoine du HAMEL
a8b3d7b26b
worker: allow URL in Worker constructor
...
The explicit goal is to let users use `import.meta.url` to
re-load thecurrent module inside a Worker instance.
Fixes: https://github.com/nodejs/node/issues/30780
PR-URL: https://github.com/nodejs/node/pull/31664
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-03-13 10:50:30 +01:00
Ruben Bridgewater
e322f74ce1
test: refactor and simplify test-repl-preview
...
Use an object to indicate which part belongs to the input and which
to the output.
On top of that this also simplifies the expected output by
automatically inserting the default repl line for previews and by
automatically checking for the correct output line length.
PR-URL: https://github.com/nodejs/node/pull/32154
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-13 09:58:13 +01:00
Ruben Bridgewater
9c18ff6440
repl: align preview with the actual executed code
...
This adds preview output for input that may not be wrapped.
PR-URL: https://github.com/nodejs/node/pull/32154
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-13 09:58:12 +01:00
ExE Boss
ba684805b6
util: use a global symbol for util.promisify.custom
...
Define `util.promisify.custom`
as `Symbol.for("nodejs.util.inspect.custom")`, rather than
as `Symbol("util.inspect.custom")`.
This allows custom `promisify` wrappers to easily/safely be defined
in non‑Node.js environments.
Fixes: https://github.com/nodejs/node/issues/31647
PR-URL: https://github.com/nodejs/node/pull/31672
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-12 19:51:25 +01:00
Harshitha KP
7fcb8da777
test: buffer.write with longer string scenario
...
Make sure longer strings are written up to the buffer end
Refs: https://github.com/nodejs/node/pull/32119
PR-URL: https://github.com/nodejs/node/pull/32123
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-12 16:56:35 +01:00
Eric Bickle
d53bcea2de
test: fix test-tls-env-extra-ca-file-load
...
Fixes broken unit test for the NODE_EXTRA_CA_CERTS environment
variable. Unit test was exiting without evaluating any assertions
or running any tests.
Fixes: https://github.com/nodejs/node/issues/32072
PR-URL: https://github.com/nodejs/node/pull/32073
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-12 16:53:29 +01:00
Robert Nagy
2bfb3403ed
stream: avoid destroying writable source
...
User might still want to be able to use the writable side
of src. This is in the case where e.g. the Duplex input
is not directly connected to its output. Such a case could
happen when the Duplex is reading from a socket and then echos
the data back on the same socket.
PR-URL: https://github.com/nodejs/node/pull/32198
Refs: https://github.com/nodejs/node/commit/4d93e105bfad79ff6c6f01e4b7c2fdd70caeb43b#commitcomment-37751035
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-11 20:57:42 -04:00
Robert Nagy
f8f20892e9
stream: avoid destroying http1 objects
...
http1 objects are coupled with their corresponding
res/req and cannot be treated independently as
normal streams. Add a special exception for this
in the pipeline cleanup.
Fixes: https://github.com/nodejs/node/issues/32184
PR-URL: https://github.com/nodejs/node/pull/32197
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-11 15:03:31 -04:00
Andrey Pechkurov
51e8f28dcc
doc,test: add server.timeout property to http2 public API
...
Both http and https modules have server.timeout property
in public API. This commit adds documentation section and test
for server.timeout in http2 module, so it becomes consistent
with http and https.
Also improves description of callback argument in documentation
for server.setTimeout().
PR-URL: https://github.com/nodejs/node/pull/31693
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-11 19:33:48 +01:00
Gerhard Stoebich
c145b29987
async_hooks: avoid resource reuse by FileHandle
...
Wrap reused read_wrap in a unique async resource to ensure that
executionAsyncResource() is not ambiguous.
PR-URL: https://github.com/nodejs/node/pull/31972
Refs: https://github.com/nodejs/node/pull/30959
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2020-03-11 19:26:10 +01:00
Eric Bickle
091444a49d
src: fix missing extra ca in tls.rootCertificates
...
Fixes tls.rootCertificates missing certificates loaded from
NODE_EXTRA_CA_CERTS.
Fixes: https://github.com/nodejs/node/issues/32074
PR-URL: https://github.com/nodejs/node/pull/32075
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-11 17:33:01 +01:00
Sergey Zelenov
0c545f0f72
zlib: emits 'close' event after readable 'end'
...
Call the close method after readable 'end' so that 'close' will be
emitted afterwards.
Fixes: https://github.com/nodejs/node/issues/32023
PR-URL: https://github.com/nodejs/node/pull/32050
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-11 17:30:22 +01:00