Refael Ackermann
c756efb25a
fs: expose Stats times as Numbers
...
PR-URL: https://github.com/nodejs/node/pull/13173
Fixes: https://github.com/nodejs/node/issues/8276
Refs: https://github.com/nodejs/node/pull/12607
Refs: https://github.com/nodejs/node/pull/12818
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-07 13:38:04 -07:00
Sam Roberts
4b2c756bfc
lib: return this from net.Socket.end()
...
PR-URL: https://github.com/nodejs/node/pull/13481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-07 13:37:54 -07:00
Rich Trott
71a3d2c87e
test: refactor test-dgram-oob-buffer
...
* Change common.noop to common.mustNotCall() to verify callback is not
invoked.
* Add destructuring assignment for clarity. Yeah, clarity. That's why.
PR-URL: https://github.com/nodejs/node/pull/13443
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-07 13:37:35 -07:00
Fedor Indutny
8efaa554f2
http: overridable keep-alive behavior of Agent
...
Introduce two overridable `Agent` methods:
* `keepSocketAlive(socket)`
* `reuseSocket(socket, req)`
These methods can be overridden by particular `Agent` class child to
make keep-alive behavior customizable.
Motivation: destroy persisted sockets after some configurable timeout.
It is very non-trivial to do it with available primitives. Such program
will most likely need to poke with undocumented events and methods of
`Agent`. With introduced API such behavior is easy to implement.
PR-URL: https://github.com/nodejs/node/pull/13005
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-07 13:37:23 -07:00
aniketshukla
757ae521b5
test: validate full error messages
...
test: changed test2 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.
Before test 2 of test-vm-timeout.js would match any RangeError,
now it looks specifically for the error message
"RangeError: timeout must be a positive number"
test: changed test 3 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.
Before test 3 of test-vm-timeout.js would match any RangeError,
now it looks specifically for the error message
"RangeError: timeout must be a positive number"
PR-URL: https://github.com/nodejs/node/pull/13453
Refs: https://github.com/nodejs/node/issues/13454
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-06-07 13:36:23 -07:00
Refael Ackermann
658560ee5b
test,fs: test fs.watch for filename
...
PR-URL: https://github.com/nodejs/node/pull/13411
Refs: https://github.com/nodejs/node/pull/13385
Refs: https://github.com/nodejs/node/issues/13248
Refs: https://github.com/nodejs/node/issues/13377
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-07 13:36:15 -07:00
Timothy Gu
ba817d3312
url: update IDNA handling
...
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.
PR-URL: https://github.com/nodejs/node/pull/13362
Refs: https://github.com/whatwg/url/pull/309
Refs: https://github.com/w3c/web-platform-tests/pull/5976
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2017-06-07 13:32:25 -07:00
David Cai
68e06e6945
test: increase coverage of async_hooks
...
PR-URL: https://github.com/nodejs/node/pull/13336
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-06-07 13:32:08 -07:00
Sam Roberts
9be8b6373e
inspector: allow --inspect=host:port from js
...
PR-URL: https://github.com/nodejs/node/pull/13228
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-07 13:31:55 -07:00
Gautam Mittal
8f2b82a2b4
errors,tty: migrate to use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/13240
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-07 13:29:51 -07:00
Joseph Gentle
b8e90ddf53
assert: fix deepEqual similar sets and maps bug
...
This fixes a bug where deepEqual and deepStrictEqual would have
incorrect behaviour in sets and maps containing multiple equivalent
keys.
PR-URL: https://github.com/nodejs/node/pull/13426
Fixes: https://github.com/nodejs/node/issues/13347
Refs: https://github.com/nodejs/node/pull/12142
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-06-07 13:28:35 -07:00
Refael Ackermann
2e3b758006
test,module: make message check MUI dependent
...
PR-URL: https://github.com/nodejs/node/pull/13393
Fixes: https://github.com/nodejs/node/issues/13376
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-06-07 13:28:04 -07:00
Sam Roberts
339d220eed
test: rearrange inspector headers into convention
...
Test guide describes a conventional layout for test headers, review
inspector tests and reorganize to follow the convention.
PR-URL: https://github.com/nodejs/node/pull/13428
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 13:10:33 -07:00
James M Snell
6aeb555cc4
zlib: revert back to Functions
...
Using ES6 Classes broke userland code. Revert back to functions.
PR-URL: https://github.com/nodejs/node/pull/13374
Fixes: https://github.com/nodejs/node/issues/13358
Ref: https://github.com/nodejs/node/pull/13370
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-06-05 12:28:24 -07:00
Anna Henningsen
9db02dcc85
async_hooks,http: fix socket reuse with Agent
...
Under very specific circumstances the `http` implementation
could be brought to crash, because the Agent did not re-assign
the async id field properly after setting up a socket for reuse.
Fixes: https://github.com/nodejs/node/issues/13325
PR-URL: https://github.com/nodejs/node/pull/13348
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-06-05 12:27:11 -07:00
Dávid Szakállas
818c935add
test: test async-hook triggerId properties
...
Add tests for checking the behavior of async_hooks.triggerId.
It should return different ids when called in callbacks having
different ancestry paths.
It should return the same id when called in callbacks having
the same ancestry path.
PR-URL: https://github.com/nodejs/node/pull/13328
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-06-05 12:26:51 -07:00
Anna Henningsen
c208f9d51f
test: check destroy hooks are called before exit
...
Verify that the destroy callback for a TCP server is called before exit
if it is closed in another destroy callback.
Fixes: https://github.com/nodejs/node/issues/13262
PR-URL: https://github.com/nodejs/node/pull/13369
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-06-05 12:26:10 -07:00
Rich Trott
406c2cd8e4
test: make test-fs-watchfile reliable
...
Omitting AIX from `fs.watch()` portion of this test. It works
on AIX, but not reliably.
PR-URL: https://github.com/nodejs/node/pull/13385
Fixes: https://github.com/nodejs/node/issues/13377
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-06-05 12:25:57 -07:00
Jesus Seijas
1bcda5efda
util: refactor format method.Performance improved.
...
Method format refactored to make it more maintenable, replacing the
switch by a function factory, that returns the appropiated function
given the character (d, i , f, j, s).
Also, performance when formatting an string that contains several
consecutive % symbols is improved. The test:
`const numSamples = 10000000;
const strPercents = '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%s%%%%%%%%%%%%%%%%%i%%%%%%%%%%%%%%%%%%%%%%%%%%';
var s;
console.time('Percents');
for (let i = 0; i < numSamples; i++) {
s = util.format(strPercents, 'test', 12);
}
console.timeEnd('Percents');`
Original time: 28399.708ms
After refactor: 23763.788ms
Improved: 16%
PR-URL: https://github.com/nodejs/node/pull/12407
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-05 12:24:21 -07:00
rmdm
47c9de9842
assert: fix deepEqual RangeError: Maximum call stack size exceeded
...
Fixes: https://github.com/nodejs/node/issues/13314
Refs: https://github.com/nodejs/node/issues/6416
This commit changes semantics of the memos cycles tracker. Before
the change it was used to track all currently wisited nodes of an
object tree, which is a bit shifted from its original intention of
tracking cycles. The change brings intended semantics, by tracking
only objects of the current branch of the object tree.
PR-URL: https://github.com/nodejs/node/pull/13318
Fixes: https://github.com/nodejs/node/issues/13314
Ref: https://github.com/nodejs/node/issues/6416
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-06-05 12:23:58 -07:00
Timothy Gu
315c3aaf43
url: more precise URLSearchParams constructor
...
PR-URL: https://github.com/nodejs/node/pull/13026
Ref: https://github.com/w3c/web-platform-tests/pull/5813
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 12:23:22 -07:00
Gibson Fahnestock
81ddeb98f6
readline: clean up event listener in onNewListener
...
Once the Readline interface is closed, the 'data' event listener should
be removed.
PR-URL: https://github.com/nodejs/node/pull/13266
Ref: https://github.com/nodejs/node/pull/9447#discussion_r86599214
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 12:23:01 -07:00
Rich Trott
e20f3577d0
test: improve test-https-server-keep-alive-timeout
...
The test is flaky under load. These changes greatly improve reliability.
* Use a recurring interval to determine when the test should end rather
than a timer.
* Increase server timeout to 500ms to allow for events being delayed by
system load
Changing to an interval has the added benefit of reducing the test run
time from over 2 seconds to under 1 second.
Fixes: https://github.com/nodejs/node/issues/13307
PR-URL: https://github.com/nodejs/node/pull/13312
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-06-05 12:22:40 -07:00
Dan Fabulich
6e0eccd7a1
fs: promisify exists correctly
...
PR-URL: https://github.com/nodejs/node/pull/13316
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-06-05 12:22:20 -07:00
Rich Trott
830049f784
test: refactor test-net-server-bind
...
* Use common.mustNotCall() and common.mustCall() as appropriate
* Use block scoping
* Move assertions out of `exit` handler and into callbacks
* Order assert.strictEqual() args per docs
* Remove console.log() calls
* Move test from `parallel` to `sequential` so `common.PORT` can be used
without conflicting with OS-provided ports in other `parallel` tests
PR-URL: https://github.com/nodejs/node/pull/13273
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-06-05 12:21:11 -07:00
Alexander O'Mara
cc3174a937
zlib: expose amount of data read for engines
...
Added bytesRead property to Zlib engines
Fixes: https://github.com/nodejs/node/issues/8874
PR-URL: https://github.com/nodejs/node/pull/13088
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-06-05 12:20:34 -07:00
Alexander O'Mara
bb77d6c1cc
zlib: option for engine in convenience methods
...
Added option to expose engine to convenience methods
Refs: https://github.com/nodejs/node/issues/8874
PR-URL: https://github.com/nodejs/node/pull/13089
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-05 12:20:27 -07:00
Rich Trott
9df8e2a3e9
test: use mustCall() in test-readline-interface
...
Use `common.mustCall()` to make sure noop function is called as
expected.
PR-URL: https://github.com/nodejs/node/pull/13259
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 12:20:20 -07:00
Ryan Kelly
50b5f8bac0
crypto: clear err stack after ECDH::BufferToPoint
...
Functions that call `ECDH::BufferToPoint` were not clearing the
error stack on failure, so an invalid key could leave leftover
error state and cause subsequent (unrelated) signing operations
to fail.
PR-URL: https://github.com/nodejs/node/pull/13275
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 12:19:44 -07:00
Yihong Wang
c7ebf6ea70
http: suppress data event if req aborted
...
Re-enable test-http-abort-stream-end and put it into parallel
category. Use system random port when calling server.listen()
and fix eslint errors.
After calling request.abort(), in order to avoid the buffered
data to trigger the 'data' event, explicitly remove 'data' event
listeners.
PR-URL: https://github.com/nodejs/node/pull/13260
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-06-05 12:19:38 -07:00
Rich Trott
25a05e5db1
test: fix flaky test-fs-watchfile on macOS
...
On macOS, a watcher created with fs.watch() does not necessarily
start receiving events immediately. So it can miss a change by
fs.writefile() if it comes very soon after the watcher is created. Fix
test flakiness caused by this by using `setInterval()` to repeat the
write action.
PR-URL: https://github.com/nodejs/node/pull/13252
Fixes: https://github.com/nodejs/node/issues/13248
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 12:19:24 -07:00
Rich Trott
ec357bf88f
test: use mustNotCall() in test-stream2-objects
...
Use `common.mustNotCall()` in test-stream2-objects.js to confirm that
noop function is never invoked.
PR-URL: https://github.com/nodejs/node/pull/13249
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-05 12:19:17 -07:00
Michaël Zasso
a2d49545a7
test: support candidate V8 versions
...
When V8 is built from its master branch, it adds a " (candidate)"
suffix to the version string. Add support for that in the tests so it
does not fail with Node canary.
PR-URL: https://github.com/nodejs/node/pull/13282
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-06-05 12:18:35 -07:00
Daniel Bevenius
f0ad3bb695
test: hasCrypto https-server-keep-alive-timeout
...
Currently this test will fail with the following error message when
configured --without-ssl:
Error: Node.js is not compiled with openssl crypto support
This commit checks for crypto and skips this tests if such support
is not available.
PR-URL: https://github.com/nodejs/node/pull/13253
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-05 12:18:22 -07:00
Refael Ackermann
010f864426
inspector: --debug* deprecation and invalidation
...
PR-URL: https://github.com/nodejs/node/pull/12949
Fixes: https://github.com/nodejs/node/issues/12364
Fixes: https://github.com/nodejs/node/issues/12630
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2017-05-29 09:35:31 -07:00
Rich Trott
ea6941f703
test: refactor test-fs-assert-encoding-error
...
Check that callbacks are not executed when errors are expected to be
thrown.
PR-URL: https://github.com/nodejs/node/pull/13226
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-29 09:35:01 -07:00
Anna Henningsen
a6023ee0b5
async_wrap: fix Promises with later enabled hooks
...
Assign a `PromiseWrap` instance to Promises that do not have one
yet when the PromiseHook is being called.
Fixes: https://github.com/nodejs/node/issues/13237
PR-URL: https://github.com/nodejs/node/pull/13242
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Matthew Loring <mattloring@google.com >
2017-05-28 12:21:18 -07:00
Aditya Anand
8d193919fb
test: replace indexOf with includes
...
PR-URL: https://github.com/nodejs/node/pull/13215
Refs: https://github.com/nodejs/node/issues/12586
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-28 07:03:41 -07:00
Anna Henningsen
220186c4a8
stream: support Uint8Array input to methods
...
PR-URL: https://github.com/nodejs/node/pull/11608
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-05-28 07:03:40 -07:00
Rich Trott
2c5c2bda61
test: check noop invocation with mustNotCall()
...
In test-child-process-spawnsync-validation-errors, check that functions
used inappropriately as options are not invoked.
PR-URL: https://github.com/nodejs/node/pull/13205
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-28 07:03:39 -07:00
cjihrig
d0dbd53eb0
test: add coverage for socket write after close
...
This commit adds test coverage for the scenario where a socket's
handle has been closed prior to writing.
PR-URL: https://github.com/nodejs/node/pull/13171
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-28 07:03:38 -07:00
Timur Shemsedinov
a7f5c9cb7d
http: destroy sockets after keepAliveTimeout
...
Implement server.keepAliveTimeout in addition to server.timeout to
prevent temporary socket/memory leaking in keep-alive mode.
PR-URL: https://github.com/nodejs/node/pull/2534
Author: Timur Shemsedinov <timur.shemsedinov@gmail.com >
Author: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-28 07:03:38 -07:00
Matteo Collina
b8b6c2c262
stream: emit finish when using writev and cork
...
In Writable, 'finish' was not emitted when using writev() and
cork() in the event of an Error during the write. This commit
makes it consistent with the write() path, which emits 'finish'.
Fixes: https://github.com/nodejs/node/issues/11121
PR-URL: https://github.com/nodejs/node/pull/13195
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:03:37 -07:00
Brian White
2264d9d4ba
http: improve outgoing string write performance
...
PR-URL: https://github.com/nodejs/node/pull/13013
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-28 07:03:37 -07:00
Rich Trott
686e753b7e
test: use common.mustNotCall in test-crypto-random
...
Use `common.mustNotCall()` to confirm that noop callbacks are not run
when functions throw errors.
PR-URL: https://github.com/nodejs/node/pull/13183
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:03:36 -07:00
Ebrahim Byagowi
d99b7bc8c9
fs: fix realpath{Sync} on resolving pipes/sockets
...
PR-URL: https://github.com/nodejs/node/pull/13028
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-28 07:03:34 -07:00
Daniel Pihlstrom
f077e51c92
src,fs: calculate fs times without truncation
...
also added some missing bits that didn't make it into #12818
PR-URL: https://github.com/nodejs/node/pull/12607
Refs: https://github.com/nodejs/node/pull/12818
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-28 07:03:30 -07:00
Rich Trott
72a319e417
test: refactor event-emitter-remove-all-listeners
...
Use common.mustNotCall() to confirm that listener handles never run (as
no events are emitted).
PR-URL: https://github.com/nodejs/node/pull/13165
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:00:45 -07:00
Rich Trott
c4502728fb
test: refactor event-emitter-check-listener-leaks
...
* add block-scoping
* use common.mustCall() on callbacks that should not execute
PR-URL: https://github.com/nodejs/node/pull/13164
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:00:45 -07:00
Alexey Orlenko
efae43f0ee
zlib: fix node crashing on invalid options
...
This commit fixes the Node process crashing when constructors of classes
of the zlib module are given invalid options.
* Throw an Error when the zlib library rejects the value of windowBits,
instead of crashing with an assertion.
* Treat windowBits and memLevel options consistently with other ones and
don't crash when non-numeric values are given.
* Fix bugs in the validation logic:
- Don't conflate 0 and undefined when checking if a field of an
options object exists.
- Treat NaN and Infinity values the same way as values of invalid
types instead of allowing to actually set zlib options to NaN or
Infinity.
PR-URL: https://github.com/nodejs/node/pull/13098
Fixes: https://github.com/nodejs/node/issues/13082
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-05-28 07:00:44 -07:00