João Lucas Lucchetta
cc7258469c
http2: fix Http2Response.sendDate
...
The `sendDate` flag was not being respected
by the current implementation and the `Date`
header was being sent regardless of the config.
This commit fixes that and adds tests for this case.
Fixes: https://github.com/nodejs/node/issues/34841
PR-URL: https://github.com/nodejs/node/pull/34850
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-24 12:19:58 +01:00
Rich Trott
e16b3e72f9
test: fix test-cluster-net-listen-relative-path.js to run in /
...
test-cluster-net-listen-relative-path fails if run from the root
directory on POSIX because the socket filename isn't quite long enough.
Increase it by 2 so that the path length always exceeds 100 characters.
PR-URL: https://github.com/nodejs/node/pull/34820
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-08-24 12:19:46 +01:00
Rich Trott
2a78c33445
test: run REPL preview test regardless of terminal type
...
PR-URL: https://github.com/nodejs/node/pull/34798
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
2020-08-24 12:19:10 +01:00
Carlos Lopez
9e0d18fd3f
http2: use and support non-empty DATA frame with END_STREAM flag
...
Adds support for reading from a stream where the final frame is a
non-empty DATA frame with the END_STREAM flag set, instead of hanging
waiting for another frame. When writing to a stream, uses a
END_STREAM flag on final DATA frame instead of adding an empty
DATA frame.
BREAKING: http2 client now expects servers to properly support
END_STREAM flag
Fixes: https://github.com/nodejs/node/issues/31309
Fixes: https://github.com/nodejs/node/issues/33891
Refs: https://nghttp2.org/documentation/types.html#c.nghttp2_on_data_chunk_recv_callback
PR-URL: https://github.com/nodejs/node/pull/33875
Backport-PR-URL: https://github.com/nodejs/node/pull/34838
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-21 03:48:51 -04:00
Bartosz Sosnowski
a16f0f427e
process: correctly parse Unicode in NODE_OPTIONS
...
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.
Fixes: https://github.com/nodejs/node/issues/34399
PR-URL: https://github.com/nodejs/node/pull/34476
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-08-20 15:05:25 +01:00
Antoine du HAMEL
b73943e476
workers: add support for data: URLs
...
PR-URL: https://github.com/nodejs/node/pull/34584
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2020-08-20 15:05:24 +01:00
cjihrig
90abdd3dd4
net: validate custom lookup() output
...
This commit adds validation to the IP address returned by the
net module's custom DNS lookup() function.
PR-URL: https://github.com/nodejs/node/pull/34813
Fixes: https://github.com/nodejs/node/issues/34812
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-08-20 15:05:23 +01:00
Anna Henningsen
6b45bf3475
test: modernize test-cluster-master-error
...
Some stylistic changes to bring this more in line with what our
tests currently look like, and add a note about general flakiness.
PR-URL: https://github.com/nodejs/node/pull/34685
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-08-20 15:05:23 +01:00
Rich Trott
c080fc590d
test: move test-inspector-already-activated-cli to parallel
...
There doesn't seem to be a reason for this test to have to stay in
sequential. It appears to have been placed there out of caution.
PR-URL: https://github.com/nodejs/node/pull/34755
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-08-20 15:05:21 +01:00
Rich Trott
e8eed5c426
test: convert assertion that always fails to assert.fail()
...
In test-http-destroyed-socket-write2, the assert.strictEqual() in the
default case of the switch statement will always fail because it checks
for a value that is already accounted for in one of the switch cases.
Convert it to assert.fail().
PR-URL: https://github.com/nodejs/node/pull/34793
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:20 +01:00
Anna Henningsen
513ab0e02f
worker: fix --abort-on-uncaught-exception handling
...
The `set_abort_on_uncaught_exception(false)` line was supposed to
prevent aborting when running Workers in
`--abort-on-uncaught-exception` mode, but it was incorrectly set
and not checked properly in the should-abort callback.
PR-URL: https://github.com/nodejs/node/pull/34724
Backport-PR-URL: https://github.com/nodejs/node/pull/34815
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: Mary Marchini <oss@mmarchini.me >
2020-08-20 15:05:20 +01:00
Anna Henningsen
03d601344a
worker: do not crash when JSTransferable lists untransferable value
...
This can currently be triggered when posting a closing FileHandle.
Refs: https://github.com/nodejs/node/pull/34746#issuecomment-673675333
PR-URL: https://github.com/nodejs/node/pull/34766
Backport-PR-URL: https://github.com/nodejs/node/pull/34814
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:20 +01:00
Denys Otrishko
04defbaacd
lib: allow to validate enums with validateOneOf
...
PR-URL: https://github.com/nodejs/node/pull/34070
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:19 +01:00
Rich Trott
c458e8406e
test: remove common.rootDir
...
The three tests that use common.rootDir do not need the root dir. They
just need an arbitrary directory that will exist. Use tmpdir.path
instead.
PR-URL: https://github.com/nodejs/node/pull/34772
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-08-20 15:05:18 +01:00
Rich Trott
1c324d5939
test: allow ENOENT in test-worker-init-failure
...
PR-URL: https://github.com/nodejs/node/pull/34769
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-08-20 15:05:18 +01:00
Rich Trott
88919e584b
test: allow ENFILE in test-worker-init-failure
...
Refs: https://github.com/nodejs/node/pull/34727#issuecomment-672862034
PR-URL: https://github.com/nodejs/node/pull/34769
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-08-20 15:05:18 +01:00
Denys Otrishko
dbcb36d553
errors: improve ERR_INVALID_OPT_VALUE error
...
* use util.inspect for value presentation
* allow to optionally specify error reason
PR-URL: https://github.com/nodejs/node/pull/34671
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
2020-08-20 15:05:17 +01:00
Anna Henningsen and Jérémy Lal
a78c638fc3
test: use process.env.PYTHON to spawn python
...
Co-authored-by: Jérémy Lal <kapouer@melix.org >
Fixes: https://github.com/nodejs/node/issues/34699
PR-URL: https://github.com/nodejs/node/pull/34700
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-08-20 15:05:16 +01:00
Robert Nagy
7ef5591d06
fs: guard against undefined behavior
...
Calling close on a file description which is currently in use is
undefined behavior due to implementation details in libuv. Add
a guard against this when using FileHandle.
PR-URL: https://github.com/nodejs/node/pull/34746
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:15 +01:00
Anna Henningsen
332e38433b
buffer: alias UInt ➡️ Uint in buffer methods
...
It’s *so* hard to remember that it’s `UintXArray` but not
`(write|read)UintX`. Let’s fix that by just providing aliases. 😊
PR-URL: https://github.com/nodejs/node/pull/34729
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-20 15:05:15 +01:00
Matthew McEachen
1a9496a79d
lib: add UNC support to url.pathToFileURL()
...
Fixes: https://github.com/nodejs/node/issues/34736
PR-URL: https://github.com/nodejs/node/pull/34743
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-20 15:05:15 +01:00
Rich Trott
9a790203ed
test: remove error message checking in test-worker-init-failure
...
Let the check for the error code suffice and don't check for a
particular string in the message.
PR-URL: https://github.com/nodejs/node/pull/34727
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:15 +01:00
Bradley Farias
84031183bc
policy: support conditions for redirects
...
PR-URL: https://github.com/nodejs/node/pull/34414
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-08-20 15:05:14 +01:00
Priyank Singh
6ee2578427
http2: add maxHeaderSize option to http2
...
add maxHeaderSize to http2 as an alias for maxHeaderListSize.
Fixes: https://github.com/nodejs/node/issues/33517
PR-URL: https://github.com/nodejs/node/pull/33636
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-08-20 15:05:13 +01:00
Rich Trott
b261895d2b
test: remove test-child-process-fork-args flaky designation
...
test-child-process-fork-args does not appear in results from `ncu-ci
walk commit` and no one has reported it failing for several months.
A stress test also passed.
Closes: https://github.com/nodejs/node/issues/32863
PR-URL: https://github.com/nodejs/node/pull/34684
Fixes: https://github.com/nodejs/node/issues/32863
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
2020-08-20 15:05:09 +01:00
Anna Henningsen
27c0653517
test: add vm crash regression test
...
Refs: https://github.com/nodejs/node/issues/34606
PR-URL: https://github.com/nodejs/node/pull/34673
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:09 +01:00
Denys Otrishko
093a4b0ae4
test: add tests for validateNumber/validateString
...
PR-URL: https://github.com/nodejs/node/pull/34672
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-20 15:05:07 +01:00
cca0372022
timers: allow timers to be used as primitives
...
This allows timers to be matched to numeric Ids and therefore used
as keys of an Object, passed and stored without storing the Timer instance.
clearTimeout/clearInterval is modified to support numeric/string Ids.
Co-authored-by: Bradley Farias <bradley.meck@gmail.com >
Co-authored-by: Anatoli Papirovski <apapirovski@mac.com >
Refs: https://github.com/nodejs/node/pull/21152
Backport-PR-URL: https://github.com/nodejs/node/pull/34482
PR-URL: https://github.com/nodejs/node/pull/34017
Backport-PR-URL: https://github.com/nodejs/node/pull/34482
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Signed-off-by: Denys Otrishko <shishugi@gmail.com >
2020-08-17 16:30:47 -04:00
James M Snell
ef4fb6878e
async_hooks: add AsyncResource.bind utility
...
Creates an internal AsyncResource and binds a function to it,
ensuring that the function is invoked within execution context
in which bind was called.
PR-URL: https://github.com/nodejs/node/pull/34574
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-08-10 21:21:56 -07:00
Rich Trott
0c4226e4e6
repl: use _Node.js_ in user-facing REPL text
...
We use _node (REPL)_ in one place and _Node.js (REPL)_ in another place
in error messages in repl.js. Use _Node.js_ in both places.
PR-URL: https://github.com/nodejs/node/pull/34644
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-08-10 21:21:56 -07:00
Rich Trott
3ecb16b0af
repl: use _REPL_ in user-facing text
...
User-facing error messages should use _REPL_ for the general REPL and
not _repl_ which should be reserved for referring to the module itself,
etc. _REPL_ is an acronym, so it should be capitalized, as it generally
is in documentation in other technologies, and is usually in our own
documentation. This fixes a few inconsistent usages in lib/repl.js.
PR-URL: https://github.com/nodejs/node/pull/34643
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-08-10 21:21:55 -07:00
gengjiawen
33777a30a9
test: fix wrong method call
...
PR-URL: https://github.com/nodejs/node/pull/34629
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-10 21:21:55 -07:00
Rich Trott
27333b1b73
test: add debugging for callbacks in test-https-foafssl.js
...
The test is timing out once in a very long while on Windows CI. It is
unclear where the test gets stuck, so add more debugging statements to
try to locate it.
Refs: https://github.com/nodejs/node/issues/24397
PR-URL: https://github.com/nodejs/node/pull/34603
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-10 21:21:53 -07:00
Rich Trott
4cd9c4f94d
test: add debugging for test-https-foafssl.js
...
The test is timing out once in a very long while on Windows CI. It is
unclear where the test gets stuck, so add more debugging statements to
try to locate it.
Refs: https://github.com/nodejs/node/issues/24397
PR-URL: https://github.com/nodejs/node/pull/34603
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-10 21:21:52 -07:00
Myles Borins
d0a599ac8b
module: unflag Top-Level Await
...
This unflags Top-Level await so it can be used by default in the module
goal. This is accomplished by manually setting the
--harmony-top-level-await flag. We are allowing this as a one of
approval based on circumstances. It is not a precedent that future
harmony features will be manually enabled.
Refs: https://github.com/nodejs/node/issues/34551
PR-URL: https://github.com/nodejs/node/pull/34558
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
2020-08-10 21:21:50 -07:00
Bradley Farias
3eabb7e5c7
policy: increase tests via permutation matrix
...
PR-URL: https://github.com/nodejs/node/pull/34404
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-10 21:21:49 -07:00
Myles Borins
938842e3eb
repl: improve static import error message in repl
...
Currently the error is rather ambiguous and does not inform folks that
static import is not supported in the repl. This overrides the default
error message with one that is more informative.
Closes: https://github.com/nodejs/node/issues/33576
PR-URL: https://github.com/nodejs/node/pull/33588
Fixes: https://github.com/nodejs/node/issues/33576
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-08-10 21:21:49 -07:00
Anna Henningsen
d6b0a40662
test: replace flaky pummel regression tests
...
These tests were written a long time ago, and use the allocation of
large amounts of unused memory as a way to detect use-after-free
problems with Buffers. As a result, the tests are resource-intensive
and may crash because of that.
Replace them with a more modern test. We don’t explicitly try to
*detect* use-after-free conditions, and instead rely on e.g. ASAN
(or the process just crashing hard) to do that for us.
Fixes: https://github.com/nodejs/node/issues/34527
PR-URL: https://github.com/nodejs/node/pull/34530
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2020-08-10 21:21:48 -07:00
Bradley Farias
ae64ec4611
repl: give repl entries unique names
...
This is a workaround for the REPL for a problem when multiple of the
entries have the same source text
Fixes: https://github.com/nodejs/node/issues/1337
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=10284
PR-URL: https://github.com/nodejs/node/pull/34372
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2020-08-10 21:21:47 -07:00
Andrey Pechkurov
18ca52d78e
async_hooks: fix id assignment in fast-path promise hook
...
Native side of fast-path promise hook was not calling JS
fastPromiseHook function when there were no async ids
previously assigned to the promise. Because of that already
created promises could not get id assigned in situations
when an async hook without a before listener function is
enabled after their creation. As the result executionAsyncId
could return wrong id when called within promise's .then().
Refs: https://github.com/nodejs/node/pull/34512
PR-URL: https://github.com/nodejs/node/pull/34548
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-08-10 21:21:47 -07:00
Rich Trott
dba869ecee
test: change Fixes: to Refs:
...
Tests don't fix things generally, so use "Refs:" to refer people to
GitHub issues.
PR-URL: https://github.com/nodejs/node/pull/34568
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-08-10 21:21:46 -07:00
Robert Nagy
283f5c3a14
test: fix flaky http-parser-timeout-reset
...
Refs: https://github.com/nodejs/node/pull/34578#issuecomment-667941698
PR-URL: https://github.com/nodejs/node/pull/34609
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2020-08-10 21:21:46 -07:00
Anna Henningsen
7c4e1db1b5
async_hooks: fix resource stack for deep stacks
...
460c81dc0e introduced a bug where the execution resource was not
stored properly if we needed to call into C++ to extend the stack size.
Fix that bug by always storing the resource.
Refs: https://github.com/nodejs/node/pull/34319
Fixes: https://github.com/nodejs/node/issues/34556
PR-URL: https://github.com/nodejs/node/pull/34573
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Gus Caplan <me@gus.host >
2020-08-10 21:21:45 -07:00
Robert Nagy
7322e58d11
http: reset headers timeout on headers complete
...
headers timeout should not occur *after* headers have been
received.
Fixes: https://github.com/nodejs/node/issues/34576
PR-URL: https://github.com/nodejs/node/pull/34578
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
2020-08-05 09:23:18 -07:00
Robert Nagy
36fd3daae6
http: provide keep-alive timeout response header
...
In http 1.1 persistent connection protocol there is a
timing race where the client sends the request and then
the server kills the connection (due to inactivity)
before receiving the client's request.
By providing a keep-alive header it is possible to provide
the client a hint of when idle timeout would occur and
avoid the race.
Fixes: https://github.com/nodejs/node/issues/34560
PR-URL: https://github.com/nodejs/node/pull/34561
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
2020-08-05 09:13:56 -07:00
unknown
f46649bc5b
util: print External address from inspect
...
Fixes: https://github.com/nodejs/node/issues/28250
PR-URL: https://github.com/nodejs/node/pull/34398
Backport-PR-URL: https://github.com/nodejs/node/pull/34583
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-08-04 11:26:23 -04:00
Anna Henningsen
0aa3809b6b
worker: make MessagePort inherit from EventTarget
...
Use `NodeEventTarget` to provide a mixed `EventEmitter`/`EventTarget`
API interface.
PR-URL: https://github.com/nodejs/node/pull/34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-07-29 11:20:46 -04:00
Robert Nagy
9b91467aac
http: don't write error to socket
...
The state of the connection is unknown at this point and
writing to it can corrupt client state before it is aware
of an error.
PR-URL: https://github.com/nodejs/node/pull/34465
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-27 18:23:45 -04:00
Daniele Belardi
e1199af50a
module: self referential modules in repl or -r
...
Load self referential modules from the repl and using the preload flag
`-r`. In both cases the base path used for resolution is the current
`process.cwd()`. Also fixes an internal cycle bug in the REPL exports
resolution.
PR-URL: https://github.com/nodejs/node/pull/32261
Fixes: https://github.com/nodejs/node/issues/31595
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2020-07-27 18:23:43 -04:00
Anna Henningsen
1a9138d679
test: delete invalid test
...
This test has not been working correctly since at least a555be2e45 .
Since it tests internals, any replacement test might become invalid
in a similar way.
Refs: https://github.com/nodejs/node/pull/34057
PR-URL: https://github.com/nodejs/node/pull/34445
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-07-27 18:13:05 -04:00