0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

18356 Commits

Author SHA1 Message Date
James M Snell
e71e71b513 http2: introducing HTTP/2
At long last: The initial *experimental* implementation of HTTP/2.

This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.

This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.

Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.

The JS API is defined within `internal/http2/*.js`.

There are two APIs provided: Core and Compat.

The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.

The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.

Tests, documentation and initial benchmarks are included.

The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.

When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.

To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.

Additional configuration options to enable verbose debugging are provided:

```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```

The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.

The following illustrates as simple HTTP/2 server and client interaction:

(The HTTP/2 client and server support both plain text and TLS connections)

```jt client = http2.connect('http://localhost:80');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
  client.destroy();
});

// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
  stream.respond({ ':status': 200 });
  stream.write('hello ');
  stream.end('world');
});
server.listen(80);
```

```js
const http2 = require('http2');
const client = http2.connect('http://localhost');

```

Author: Anna Henningsen <anna@addaleax.net>
Author: Colin Ihrig <cjihrig@gmail.com>
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Author: James M Snell <jasnell@gmail.com>
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com>
Author: Robert Kowalski <rok@kowalski.gd>
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Author: Sebastiaan Deckers <sebdeckers83@gmail.com>
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:44 -07:00
James M Snell
71a1876f6c deps: add nghttp2 dependency
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:39 -07:00
James M Snell
b1909d3a70 tls: add tlsSocket.disableRenegotiation()
Allows TLS renegotiation to be disabled per `TLSSocket` instance.
Per HTTP/2, TLS renegotiation is forbidden after the initial
connection prefix is exchanged.

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:30 -07:00
James M Snell
9ea363ee99 http: move utcDate to internal/http.js
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:22 -07:00
Rich Trott
1abfbbb1c4 doc: add entry for subprocess.killed property
PR-URL: https://github.com/nodejs/node/pull/14578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-04 11:34:01 -07:00
Rich Trott
dd75005a9e doc: change child to subprocess
PR-URL: https://github.com/nodejs/node/pull/14578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-04 11:32:38 -07:00
Bartosz Sosnowski
2dc09f656b test: read proper inspector message size
Fix a bug when messages bigger than 64kb where incorrectly parsed by
the inspector-helper.

PR-URL: https://github.com/nodejs/node/pull/14596
Fixes: https://github.com/nodejs/node/issues/14507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-04 10:47:50 -07:00
Greg Alexander
211df3fe8c util: implement %o and %O as formatting specifiers
Implementing the %o and %O formatting specifiers for util.format.
Based on discussion in issue, this specifier should just call
util.inspect to format the value.

PR-URL: https://github.com/nodejs/node/pull/14558
Fixes: https://github.com/nodejs/node/issues/14545
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-04 19:30:42 +02:00
Michaël Zasso
753b68f9d8 test: support odd value for kStringMaxLength
V8 6.2 will support a larger maximum string length on 64-bit platforms.
Update the test to take into account its odd value ((1 << 30) - 1 - 24).

Refs: e8c9649e25
PR-URL: https://github.com/nodejs/node/pull/14476
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-04 08:44:23 +02:00
James M Snell
4e8bc7181c test: improve multiple zlib tests
PR-URL: https://github.com/nodejs/node/pull/14455
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-08-03 17:07:14 -07:00
James M Snell
4b23b42981 test: improve multiple vm tests
PR-URL: https://github.com/nodejs/node/pull/14458
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-08-03 11:00:23 -07:00
Vse Mozhet Byt
d41423fe72 doc: erase unneeded eslint-plugin-markdown comment
eslint-plugin-markdown comments affect only a code block below them,
so there is no need to cancel them for the rest code blocks.

PR-URL: https://github.com/nodejs/node/pull/14598
Refs:
 https://github.com/eslint/eslint-plugin-markdown#configuration-comments
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-03 20:51:20 +03:00
Rich Trott
a92a5c17eb tools: simplify no-unescaped-regexp-dot rule
no-unescaped-regexp-dot ESLint custom rule contains feature detection
that is not needed on master or the v6.x-staging branch. The rule does
not exist in the v4.x-staging branch. Remove the unnecessary complexity.

PR-URL: https://github.com/nodejs/node/pull/14561
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-03 10:31:36 -07:00
Anna Henningsen
fb3d0e25cb console,test: make message test more accurate
Make a message test more accurate in what it’s testing for.
This requires not swallowing stack overflow RangeErrors in
`console.log` and similar methods, which I would consider a
bugfix in itself.

PR-URL: https://github.com/nodejs/node/pull/14580
Fixes: https://github.com/nodejs/node-v8/issues/5
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-03 15:41:14 +02:00
cjihrig
5a050550d3 dgram: add custom lookup function in sockets
This commit adds support for custom DNS lookup functions in
dgram sockets. This is similar to the existing feature in net
sockets.

Refs: https://github.com/nodejs/node/issues/6189
PR-URL: https://github.com/nodejs/node/pull/14560
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-08-02 20:32:51 -04:00
Yuta Hiroto
46c3dd701a doc: fix typo in writing-and-running-benchmarks.md
PR-URL: https://github.com/nodejs/node/pull/14600
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-08-02 16:35:28 -07:00
Lance Ball
766506a2e9
repl: deprecate REPLServer.parseREPLKeyword
This method does not need to be visible to user code. It has been
undocumented since it was introduced which was perhaps v0.8.9.

The motivation for this change is that the method is simply an
implementation detail of the REPLServer behavior, and does
not need to be exposed to user code.

This change adds documentation of the method with a deprecation
warning, and a test that the method is actually documented.

PR-RUL: https://github.com/nodejs/node/pull/14223
Refs: https://github.com/nodejs/node/issues/7619
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 14:39:06 -04:00
Rich Trott
e506bcd899 tools: replace assert-throw-arguments custom lint
The functionality of ESLint custom rule assert-throws-arguments can be
replaced with no-restricted-syntax entries.

PR-URL: https://github.com/nodejs/node/pull/14547
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 09:27:35 -07:00
Rich Trott
548cc72f66 test: refactor test-domain-abort-on-uncaught
* use common.mustCall() instead of exit handler
* use execSync instead of exec so test is reliable under load
* move from sequential to parallel

PR-URL: https://github.com/nodejs/node/pull/14541
Fixes: https://github.com/nodejs/node/issues/11826
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 09:26:00 -07:00
James M Snell
cc43c8fb54 console: add console.count() and console.clear()
Both are simple utility functions defined by the WHATWG
console spec (https://console.spec.whatwg.org/).

PR-URL: https://github.com/nodejs/node/pull/12678
Ref: https://github.com/nodejs/node/issues/12675
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-02 08:23:07 -07:00
Tobias Nießen
98bae29304 src: return MaybeLocal in AsyncWrap::MakeCallback
PR-URL: https://github.com/nodejs/node/pull/14549
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-02 12:03:21 +02:00
Tobias Nießen
1c362436b7 crypto: change segmentation faults to CHECKs
PR-URL: https://github.com/nodejs/node/pull/14548
Fixes: https://github.com/nodejs/node/issues/14519
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-02 11:57:34 +02:00
Anna Henningsen
8a8a6865c0
doc,net: assign deprecation code
Missed while landing 75a19fb379.

Ref: https://github.com/nodejs/node/pull/14449
PR-URL: https://github.com/nodejs/node/pull/14576
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 00:35:21 +02:00
Lance Ball
2ca9f94e33
repl: make REPLServer.bufferedCommand private
The `REPLServer.bufferedCommand` property was undocumented, except
for its usage appearing, unexplained, in an example for
`REPLServer.defineCommand`. This commit deprecates that property,
privatizes it, and adds a `REPLServer.clearBufferedCommand()`
function that will clear the buffer.

PR-URL: https://github.com/nodejs/node/pull/13687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de>

Refs: https://github.com/nodejs/node/issues/12686
2017-08-01 22:45:28 +02:00
Yang Guo
98ddab4115
deps: backport rehash strings after deserialization
Original commit messages:
a2ab1353f6
  [snapshot] Rehash strings after deserialization.

  See https://goo.gl/6aN8xA

  Bug: v8:6593
  Change-Id: Ic8b0b57195d01d41591397d5d45de3f0f3ebc3d9
  Reviewed-on: https://chromium-review.googlesource.com/574527
  Reviewed-by: Camillo Bruni <cbruni@chromium.org>
  Reviewed-by: Jakob Gruber <jgruber@chromium.org>
  Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#46732}

182caaf4a9
  Do not track transitions for built-in objects.

  Objects created during bootstrapping do not need
  a transition tree except for elements kind transitions.

  Bug: v8:6596
  Change-Id: I237b8b2792f201336e1c9731c815095dd06bc182
  Reviewed-on: https://chromium-review.googlesource.com/571750
  Reviewed-by: Igor Sheludko <ishell@chromium.org>
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#46693}

Fixes: https://github.com/nodejs/node/issues/14171
Refs: https://github.com/nodejs/node/pull/14345

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:16 -05:00
Michaël Zasso
a3c5ccd78c
src: fix new V8 compiler warnings
PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:16 -05:00
Michaël Zasso
5651a6f65b
deps: backport c0f1ff2 from upstream V8
Original commit message:

    Fix GCC 7 build errors

    BUG=chromium:691681
    R=franzih@chromium.org

    Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
    Reviewed-on: https://chromium-review.googlesource.com/530227
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46045}

Refs: https://github.com/nodejs/node/pull/13517
Fixes: https://github.com/nodejs/node/issues/10388
Refs: https://github.com/nodejs/node/pull/12392

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:16 -05:00
Bartosz Sosnowski
ed30842440
deps: fix addons compilation with VS2013
VS2013 does not support defaulting move constructor and assignment
operator. This adds explicit definitions of those methods for two
classes.
This fix is required because we still support building addons with
VS2013 and the incompatibility is in v8.h.

Fixes: https://github.com/nodejs/node-v8/issues/4
Refs: https://github.com/nodejs/node/pull/13263

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:16 -05:00
Ben Noordhuis
28aa7d0066
v8: fix stack overflow in recursive method
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock()
used to self-recurse before this commit, causing stack overflows on
systems with small stack sizes.  Make it non-recursive by storing
intermediate results in a heap-allocated list.

Fixes: https://github.com/nodejs/node/issues/11991
Refs: https://github.com/nodejs/node/pull/12460

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:16 -05:00
Michael Dawson
ebd13c333c
deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
Refs: https://github.com/nodejs/node/pull/6678

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:15 -05:00
Myles Borins
db476fc8b5
src: update NODE_MODULE_VERSION to 57
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 6.0.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:15 -05:00
Myles Borins
0a66b223e1
deps: update V8 to 6.0.286.52
PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:15 -05:00
Jimmy Thomson
1782b3836b
build: fix build without icu
When building without ICU (`vcbuild.bat intl-none`) the unicode/ucnv.h
header is not available, which causes compilation errors.

PR-URL: https://github.com/nodejs/node/pull/14533
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-01 14:25:56 -04:00
Anna Henningsen
0f5dabe4ed
dns: name generated functions
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 19:57:24 +02:00
Anna Henningsen
732658e4cf
dns: add channel.cancel()
This can be used to implement custom timeouts.

Fixes: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 19:57:24 +02:00
Anna Henningsen
6e05970494
dns: enable usage of independent cares resolvers
Ref: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 19:57:23 +02:00
Anna Henningsen
727b2911ec
src,dns: refactor cares_wrap to avoid global state
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 19:57:23 +02:00
Jason Ginchereau
cee8d6d65e build,win: fix python detection script
Handle spaces in the path to python.exe, in case it is installed
under some directory like "C:\Program Files".

PR-URL: https://github.com/nodejs/node/pull/14546
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-08-01 10:56:04 -07:00
Rich Trott
ff1a51920e test: refactor test-vm-new-script-new-context
* block scope test cases
* clean up global leaks in individual test cases
* enable global variable leak checking
* remove console.error() statements

PR-URL: https://github.com/nodejs/node/pull/14536
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-01 10:10:35 -07:00
Rich Trott
8c2cac650a test: refactor test/sequential/test-fs-watch.js
* add block scoping
* rename block-scoped identifiers (e.g., filenameTwo -> filename)
* use common.mustCall() instead of exit handler
* use common.mustNotCall() as appropriate
* order modules per test writing guide

PR-URL: https://github.com/nodejs/node/pull/14534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 10:05:17 -07:00
Ezequiel Garcia
13d6eae5f3 test: add check on an addon that does not register
This commit calls require on a shared library that is not declared
as a node module, and therefore does not register properly.

PR-URL: https://github.com/nodejs/node/pull/13954
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-08-01 17:25:51 +02:00
Weijia Wang
bdfbce9241 http_client, errors: migrate to internal/errors
PR-URL: https://github.com/nodejs/node/pull/14423
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 14:08:12 +02:00
Ruben Bridgewater
8db39971b7 test: clean up some assert deepEqual tests
PR-URL: https://github.com/nodejs/node/pull/14491
Fixes: https://github.com/nodejs/node/issues/14441
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 13:27:39 +02:00
Ruben Bridgewater
a8149c4799 assert: fix deepEqual inconsistencies
PR-URL: https://github.com/nodejs/node/pull/14491
Fixes: https://github.com/nodejs/node/issues/14441
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 13:26:07 +02:00
Myles Borins
8a53897325
2017-08-01, Version 6.11.2 'Boron' (LTS)
This LTS release comes with 221 commits. This includes 80 which are
test related, 52 which are doc related, 32 which are build / tool
related and 10 commits which are updates to dependencies.

Notable Changes:

* configure:
  - add mips64el to valid_arch (Aditya Anand)
    - https://github.com/nodejs/node/pull/13620
* crypto:
  - Updated root certificates based on [NSS 3.30] (Ben Noordhuis)
    - https://github.com/nodejs/node/pull/13279
    - https://github.com/nodejs/node/pull/12402
    - https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.30_release_notes
* deps:
  - upgrade OpenSSL to version 1.0.2.l (Shigeki Ohtsu)
    - https://github.com/nodejs/node/pull/12913
* http:
  - parse errors are now reported when NODE_DEBUG=http (Sam Roberts)
    - https://github.com/nodejs/node/pull/13206
  - Agent construction can now be envoked without `new` (cjihrig)
    - https://github.com/nodejs/node/pull/12927
* zlib:
  - node will now throw an Error when zlib rejects the value of windowBits,
    instead of crashing (Alexey Orlenko)
    - https://github.com/nodejs/node/pull/13098

PR-URL: https://github.com/nodejs/node/pull/14356
2017-08-01 02:10:20 -05:00
Timothy Gu
57630adf90
url: update sort() behavior with no params
PR-URL: https://github.com/nodejs/node/pull/14185
Refs: https://github.com/whatwg/url/pull/336
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-01 11:58:15 +08:00
Timothy Gu
6e79076fee
doc, url: add changelog metadata for url.format
PR-URL: https://github.com/nodejs/node/pull/14543
Fixes: https://github.com/nodejs/node/issues/11103
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-01 11:46:19 +08:00
Matthew Alsup
859ccd78b5 benchmark: remove unused parameters
Functions completeConfig, completeRun, and
updateProgress had unused parameters. These
were removed.

PR-URL: https://github.com/nodejs/node/pull/14526
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-31 19:33:18 -07:00
Azard
b8e0a5ea23
readline: remove max limit of crlfDelay
PR-URL: https://github.com/nodejs/node/pull/13497
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-31 23:03:18 +02:00
Anna Henningsen
717a138b4a
zlib: fix interaction of flushing and needDrain
Fixes: https://github.com/nodejs/node/issues/14523
PR-URL: https://github.com/nodejs/node/pull/14527
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-31 22:44:05 +02:00