Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

http2: Introducing http/2 #14239

Closed
wants to merge 26 commits into
from

Conversation

Owner

jasnell commented Jul 14, 2017 edited by ofrobots

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.

Contributors to this work include:

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)

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);
const http2 = require('http2');
const client = http2.connect('http://localhost');
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

http2

[Edit:ofrobots: fixed github handle for Kelvin Jin]

@jasnell jasnell changed the title from Initial pr to http2: Introducing http/2 Jul 14, 2017

Owner

Fishrock123 commented Jul 14, 2017

Just a thought: separating the new dep checkin to a separate commit might make review easier?

Owner

jasnell commented Jul 14, 2017

This thing is going to be massive and difficult to review no matter how it is split up, unfortunately.

+ nghttp2_pq_entry **q;
+ /* Memory allocator */
+ nghttp2_mem *mem;
+ /* The number of items sotred */
@lucaslago

lucaslago Jul 14, 2017

Contributor

Nitpick: typo on this comment

@jasnell

jasnell Jul 14, 2017

Owner

That's in the upstream dependency so it would need to be fixed there :-) https://github.com/nghttp2/nghttp2

+
+if (!common.hasCrypto) {
+ common.skip('missing crypto');
+ return;
@vsemozhetbyt

vsemozhetbyt Jul 14, 2017 edited

Member

A nit: redundant after #14021

@jasnell

jasnell Jul 14, 2017

Owner

thinking about it, I think I need to go add the crypto skip in a couple of the other tests.

@sebdeckers sebdeckers added a commit to sebdeckers/nghttp2 that referenced this pull request Jul 14, 2017

@sebdeckers sebdeckers fix: typo
Came up in downstream code review by @lucaslago nodejs/node#14239 (comment)
c601e60

@sebdeckers sebdeckers referenced this pull request in nghttp2/nghttp2 Jul 14, 2017

Merged

fix: typo #958

Owner

addaleax commented Jul 15, 2017

@jasnell We also split out the deps commits for node-inspect and for the inspector iirc; that worked out pretty well and did help with reviewing. :)

Owner

addaleax commented Jul 15, 2017

Also, for N-API, async_hooks, and some other PRs, we used Author: name <email> metadata (example: 56e881d) for specifying multiple authors. Feel invited to adapt that format. :) (That has the nice side effect of not pinging everybody everytime you rebase/the commit is landed/etc.)

+
+An object describing the current status of this `Http2Session`.
+
+#### http2session.priority(stream, options)
@addaleax

addaleax Jul 15, 2017

Owner

This does the same thing as stream.priority(options), right? In that case I think I’d prefer not to expose it (same thing for rstStream)

@jasnell

jasnell Jul 17, 2017

Owner

Currently, yes, but eventually this will support the ability to pass in a numeric stream identifier rather than the Http2Stream object. The HTTP/2 spec allows priorities and rst_stream frames to be sent independently, even without a stream having been previously established.

Member

yoshuawuyts commented Jul 15, 2017

The colon prefix in :status looks a bit odd to me. I'm sure there have been careful considerations made as to why that makes sense. Would you mind sharing the reasoning behind using colon prefixes? Thanks!

Owner

mcollina commented Jul 15, 2017

Member

yoshuawuyts commented Jul 15, 2017

Member

dougwilson commented Jul 15, 2017

Awesome work! Above you said the following:

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

I tried looking in the documentation included in this PR, but couldn't figure out what these exceptions are. Can you ellaborate? Is the compatibility API just the same how the "spdy" module does the HTTP/2 -> 1 compatibility API or different somehow? I'm not really looking for a comparison to the "spdy" module, but thought if you knew that would help, otherwise would love to see the docs around what these differences are.

Owner

jasnell commented Jul 15, 2017

@dougwilson .... I'm hoping to get that compat api documented this next week... Including those caveats.

Member

vsemozhetbyt commented Jul 15, 2017 edited

http2 should also be added to all.md.

doc/api/errors.md
+<a id="ERR_HTTP2_STREAM_ERROR"></a>
+### ERR_HTTP2_STREAM_ERROR
+
+Used when a non-zero error code has been specified in an RST_STREAM frame.
@vsemozhetbyt

vsemozhetbyt Jul 15, 2017

Member

`RST_STREAM`?

+
+To run the `http2` benchmarks, the `h2load` benchmarker must be used. The
+`h2load` tool is a component of the `nghttp2` project and may be installed
+from [nghttp.org][] or built from source.
@vsemozhetbyt

vsemozhetbyt Jul 15, 2017

Member

nghttp2.org

Member

dougwilson commented Jul 15, 2017

Thanks @jasnell ! Please feel free to ping me when you do, I would love to take a look.

doc/api/http2.md
+[`tls.TLSSocket`]: tls.html
+[`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener
+[ClientHttp2Stream]: #http2_class_clienthttp2stream
+[Compatibility API: #http2_compatibility_api
@vsemozhetbyt

vsemozhetbyt Jul 16, 2017

Member

missing ]

doc/api/http2.md
+[`net.Socket`]: net.html
+[`tls.TLSSocket`]: tls.html
+[`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener
+[ClientHttp2Stream]: #http2_class_clienthttp2stream
@vsemozhetbyt

vsemozhetbyt Jul 16, 2017

Member

According to using in text,

[ServerHttp2Stream]: [ClientHttp2Stream]: [Http2Stream]:

should be:

[`ServerHttp2Stream`]: [`ClientHttp2Stream`]: [`Http2Stream`]:

doc/api/http2.md
+* `settings` {[Settings Object][]}
+* Returns: {Buffer}
+
+Returns a [Buffer][] instance containing serialized representation of the given
@vsemozhetbyt

vsemozhetbyt Jul 16, 2017

Member

Missing reference for [Buffer][]

doc/api/http2.md
+* A new HTTP/2 `HEADERS` frame with a previously unused stream ID is received;
+* The `http2stream.pushStream()` method is called.
+
+On the client side, instances of [`ClientHttp2Stream`[] are created when the
@vsemozhetbyt

vsemozhetbyt Jul 16, 2017

Member

Missing ]

Member

vsemozhetbyt commented Jul 16, 2017

Issue with the first examples from the main doc: #14304

Contributor

sebdeckers commented Jul 16, 2017 edited

@dougwilson Some notable differences, off the top of my head:

  • Most private variables are not supported. Only the documented methods, properties, and events are supported. Code that relies on undocumented behaviour is not supported by the compat api. E.g. no more _header checking; use headersSent instead.

  • The request and response objects do not inherit from http.IncomingMessage and http.ServerResponse respectively. This poses a challenge for express@4, in my experience.

  • No status message in sendHead because HTTP/2 dropped the concept of text status messages. Status code is now the :status header. A process warning is emitted if the (optional) status message is passed. The message itself is ignored. Status code and rest of the headers are sent.

  • The socket property should not be written to. HTTP/2 has a framing layer and does not directly expose the socket. Only the low-level nghttp2 library deals with the socket. However meta properties on the socket can be useful, like detecting http vs https, address/port, TLS info, etc.

  • Only status codes 1xx-5xx are supported. This follows the HTTP spec. Previously in the HTTP/1 API status codes 1xx-9xx were allowed.

  • Extensions:

    • The [req|res].stream property exposes the HTTP/2 stream, which in turn exposes the HTTP/2 session.
    • res.createPushResponse(headers, cb) can use used to send a PUSH_PROMISE frame. The callback receives the corresponding Http2ServerResponse instance via which headers and a body can be sent.

spruce commented Jul 17, 2017

Great to get started with http2 in node land.

Could you explain the reasoning behind the secure version beeing prefixed and the insecure version be prefixless.
Shouldn't this be reversed instead. Meaning http2.createServer() should be http2.createInsecureServer() and http2.createSecureServer(opts) should be http2.createServer(opts). Because first it should be the default scenario and also alert the user that he is using some unsecure connection.

Owner

mcollina commented Jul 17, 2017

@spruce I'm against that, mainly because you should not terminate SSL at the Node.js layer, but rather use a TLS terminator in front. This is the de-facto pattern in node.js deployments.

Owner

jasnell commented Jul 17, 2017

All, commits split as requested by @Fishrock123 and @addaleax

Owner

jasnell commented Jul 17, 2017

I have been considering collapsing http2.createServer() and http2.createSecureServer() into a single function that keys off whether or not TLS options are included in the options. Not sure if that's a good idea or a terrible one.

Member

vsemozhetbyt commented Jul 17, 2017

@include http2 should also be added to all.md

Member

tniessen commented Jul 17, 2017

I have been considering collapsing http2.createServer() and http2.createSecureServer() into a single function that keys off whether or not TLS options are included in the options. Not sure if that's a good idea or a terrible one.

I don't like this idea as it is. It should not be possible to call createServer with the intention of creating a TLS socket but without supplying required options. We could, however, automatically "upgrade" to a TLS socket if TLS options are supplied to createServer.

Contributor

mgol commented Jul 17, 2017

It should not be possible to call createServer with the intention of creating a TLS socket but without supplying required options. We could, however, automatically "upgrade" to a TLS socket if TLS options are supplied to createServer.

But then people can just use createServer with the intention of using it as createSecureServer, forgetting a proper option and non-intentionally making it insecure.

Member

tniessen commented Jul 17, 2017

But then people can just use createServer with the intention of using it as createSecureServer, forgetting a proper option and non-intentionally making it insecure.

Good point, so a clean dinstiction is probably the best way to go. Maybe throw if TLS options are passed to createServer to prevent people from assuming the socket is secure? Although we might be overthinking this, people will quickly discover that their socket does not handle TLS connections.

Owner

jasnell commented Jul 17, 2017

@vsemozhetbyt updated!

Owner

jasnell commented Jul 17, 2017

Getting some flaky test results across a couple of platforms. Will get those fixed in the next day.

@nodejs/collaborators ... I'd like to get this landed this week, if at all possible. I know there's a lot here, but I'd definitely appreciate folks taking a look.

If this can be my two cents on this issue about SSL, for gRPC, we decided to always require the options array, with a "use_insecure_channel" bypass. So you're required to always provide explicitly what you want to do with regards to encryption.

Contributor

gireeshpunathil commented Jul 18, 2017

Thank you all those who worked behind this great feature! Still going through massive collection of files and understanding the design. Bear with me for the questions which may have answers in the code itself.

  1. node.js always had a proto-type of chunked HTTP transport design in node_http_parser.c with a number of hooks at the protocol data parsing phases, but were never exposed to the userland as the protocol (1.1) itself did not support that. Is it a right statement?

  2. Http2Server Event: 'stream' - this is emitted when a 'stream' event has been emitted by an Http2Session associated with the server. Is it a recurring event, or a one-time business?

  3. http2stream.respondWithFD(fd[, headers]): What is the use case of this at the top level?

  4. http2stream.priority(options) : Updates the priority for this Http2Stream instance. What this implies to a communication? Will all data transport through the stream elevate their priority in relation to the rest in the system?

  5. How do a client distinguish between a server's reactive response vs. a push? In other words,

will client implement
req.on('data', cb)
or
stream.on('push', cb)
or both? should the client know the server's behavior in advance?

Owner

jasnell commented Jul 19, 2017 edited

New CI: https://ci.nodejs.org/job/node-test-pull-request/9236/ (valgrind is our friend edition)

Owner

jasnell commented Jul 19, 2017

New CI: https://ci.nodejs.org/job/node-test-pull-request/9238/ (the by jove I think I've got it edition)

(sorry for the multiple runs, btw, debugging issues that are only showing up in CI is lots of fun)

Member

dougwilson commented Jul 19, 2017

@sebdeckers thanks for the summary, I appreciate it :) !

doc/api/http2.md
+
+## Compatibility API
+
+TBD
@dougwilson

dougwilson Jul 19, 2017

Member

Will this be filled out in this pull request or deferred to a follow up pull request? If this one, here is a reminder of the TBD :)

@jasnell

jasnell Jul 19, 2017

Owner

Likely deferred unless someone (ahem @sebdeckers ... ahem @mcollina ;-) ..) manages to get something in :-)

Contributor

ronkorving commented Jul 19, 2017

Great to see this finally come together, awesome job to all involved! :)

I have a question about doing client requests.

Should we not try and make it so that we can easily hit a server and regardless of that server supporting HTTP 1.0, 1.1. or 2, make the request? Maybe that's out of scope, but I think it is very much a real-world issue. I think users don't want to have to consider the protocol (and thus the module) when making a request somewhere. If I'm not mistaken, people already have to do this when doing an https vs. an http request (correct me if I'm wrong), which is already a nuisance. Are we inflating this issue?

Owner

jasnell commented Jul 19, 2017

CI is good! woot! The handful of failures there are completely unrelated.

Owner

jasnell commented Jul 19, 2017

@ronkorving ... That exact kind of thing is something we very much want to work towards incrementally. A key goal this far has been to get the basic mechanism functional, with a reasonable API without any disruption to the existing http stack in core (I.e. no breaking changes). Once we have the basic mechanisms in place and we're sure they work, we can begin working towards better integration.

Contributor

sebdeckers commented Jul 19, 2017

@ronkorving I believe that makes sense. The secure server also supports a fallback to HTTP/1.1 using ALPN.

Considerations for the client:

  • Make the protocol fallback opt-in?
  • Only support it via ALPN (meaning, TLS required) or also the "upgrade: h2c" header and/or alt-svc header mechanisms?
Owner

jasnell commented Jul 19, 2017

New CI: https://ci.nodejs.org/job/node-test-pull-request/9259/

@nodejs/collaborators @nodejs/ctc ... with the understanding going into it that (a) this is a massive PR that's difficult to review and (b) there are still likely a number of issues to work through, I'd like to get this PR merged so that we can continue iterating. CI is looking good, the code is behind a flag and, at least for the time being, shouldn't be pulled in to a 8.x release at least for a few more weeks.

Contributor

langpavel commented Jul 19, 2017

I heavily appreciate this PR. However, can this work be done at first as a may be native module or extension?
That way you can experiment with multiple different implementations and APIs and make the best thing that will land with great consensus.
If this is not possible, why?

Owner

jasnell commented Jul 19, 2017

There has been general general agreement that implementing this as a core module is the right approach to take. As an experimental feature, we are free to evolve implementation and API as we go outside the normal semver and LTS constraints. I'm quite happy to work with anyone who has alternate views on the implementation and if the alternate makes things better for users, then all the better!

Owner

jasnell commented Jul 20, 2017

CI is green across the board!

Contributor

langpavel commented Jul 20, 2017

Well, can someone refer to wiki or website where all the consensus can be easily seen?
There are so much people not interested in HTTP2 unfortunately.
On other side there are people who invested a lot to websockets or server sent events. How did this stuff work with HTTP2?
So there is question one level up:
Is it possible to design HTTP to HTTP2 transition layer? How smart proxies handle like this situation? What is done and what is clear that will bring more pain if we just start use some up-bridge which will look transparent for libraries?

Owner

jasnell commented Jul 20, 2017

This work has specifically been done in a way that leaves the existing http stack in core alone so that there is no interference with things like websockets or any of the existing applications that exist out there in the wild. There are certainly many questions that still need to be answered around the use of http/2 in general. Fortunately, the two implementations can safely sit side by side without us having answer all of those questions.

A transition layer is possible. As I mentioned a few comments up, we opted not to pursue that too much now because it's not yet clear what users are going to need or want.

As for the collision with the existing http2 package in npm, would it be feasible to make it an http/2 core module instead (so it sits inside the node-controlled http namespace), or is it not possible to use slashes in core modules?

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: add tests and benchmarks
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
837dfe4

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: remove redundant return in test
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
e4b9149

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix documentation nits
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
8357bd0

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell doc: include http2.md in all.md
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
295e4b1

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell test: fix flakiness in test-http2-client-upload
Race condition in the closing of the stream causing failure on
some platforms.

PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
9cb0611

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell test: fix flaky test-http2-client-unescaped-path on osx
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
fefe2cb

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix abort when client.destroy inside end event
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
a93b3b8

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: refinement and test for socketError
Fixes: nodejs/http2#184

Refines the `'socketError'` event a bit and adds a test for the
emission of the `'socketError'` event on the server. Client side
is tested separately

PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2289352

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix socketOnTimeout and a segfault
Fixes: nodejs/http2#179

Was fixing issue #179 and encountered a segault that was
happening somewhat randomly on session destruction. Both
should be fixed

PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
d74da3a

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: add range support for respondWith{File|FD}
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
  range requests
* Fix linting nits following most recent update

PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
07758c8

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@mcollina @jasnell mcollina + jasnell http2: doc and fixes to the Compatibility API
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
0d8bf4c

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@mcollina @jasnell mcollina + jasnell http2: make writeHead behave like HTTP/1.
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2db82e0

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: address initial pr feedback
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
6bc7cc2

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: refactor trailers API
Rather than using the `'fetchTrailers'` event to collect trailers,
a new `getTrailers` callback option is supported. If not set, the
internals will skip calling out for trailers at all. Expands the
test to make sure trailers work from the client side also.

PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
0a5fe92

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: get trailers working with the compat api
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
7c5825b

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: use static allocated arrays
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
0e13eb6

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: minor cleanup
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
a2045e9

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix documentation errors
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
c9c9e92

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: add some doc detail for invalid header chars
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ea2a35f

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix compilation error after V8 update
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
69a0783

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix linting after rebase
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ba2744e

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@jasnell jasnell http2: fix flakiness in timeout
PR-URL: nodejs#14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
c58115d

@jasnell jasnell added a commit to jasnell/node that referenced this pull request Aug 13, 2017

@addaleax @jasnell addaleax + jasnell http2: use per-environment buffers
As discussed in the review for
nodejs#14239, these buffers should
be per-Environment rather than static.

PR-URL: nodejs#14744
Reviewed-By: James M Snell <jasnell@gmail.com>
a6c1571

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http: move utcDate to internal/http.js
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
e0001dc

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax 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.

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
e84c9d7

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax deps: add nghttp2 dependency
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
fef2aa7

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax 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>

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
9623ee0

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: add tests and benchmarks
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
3eb61b0

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: remove redundant return in test
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
a49146e

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix documentation nits
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
e8cc193

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax doc: include http2.md in all.md
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
be716d0

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax test: fix flakiness in test-http2-client-upload
Race condition in the closing of the stream causing failure on
some platforms.

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
9d752d5

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax test: fix flaky test-http2-client-unescaped-path on osx
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
97f622b

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix abort when client.destroy inside end event
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
cd0f4c6

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: refinement and test for socketError
Fixes: nodejs/http2#184

Refines the `'socketError'` event a bit and adds a test for the
emission of the `'socketError'` event on the server. Client side
is tested separately

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2620769

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix socketOnTimeout and a segfault
Fixes: nodejs/http2#179

Was fixing issue #179 and encountered a segault that was
happening somewhat randomly on session destruction. Both
should be fixed

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
61696f1

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: add range support for respondWith{File|FD}
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
  range requests
* Fix linting nits following most recent update

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
8f3bbd9

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@mcollina @addaleax mcollina + addaleax http2: doc and fixes to the Compatibility API
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
b778838

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@mcollina @addaleax mcollina + addaleax http2: make writeHead behave like HTTP/1.
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
7824fa0

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: address initial pr feedback
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
26e1f8e

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: refactor trailers API
Rather than using the `'fetchTrailers'` event to collect trailers,
a new `getTrailers` callback option is supported. If not set, the
internals will skip calling out for trailers at all. Expands the
test to make sure trailers work from the client side also.

Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
3e5b07a

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: get trailers working with the compat api
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
9a4be4a

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: use static allocated arrays
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
174ab6f

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: minor cleanup
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
33b03b2

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix documentation errors
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
b43caf9

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: add some doc detail for invalid header chars
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
f46c50b

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix compilation error after V8 update
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
efd929e

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix linting after rebase
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
6a30448

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@jasnell @addaleax jasnell + addaleax http2: fix flakiness in timeout
Backport-PR-URL: #14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com>

PR-URL: #14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
723d1af

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@addaleax addaleax http2: use per-environment buffers
As discussed in the review for
#14239, these buffers should
be per-Environment rather than static.

PR-URL: #14744
Reviewed-By: James M Snell <jasnell@gmail.com>
8a0d101

@addaleax addaleax referenced this pull request Aug 14, 2017

Closed

[8.x] Backport multiple http2 PRs #14813

4 of 4 tasks complete

@addaleax addaleax added a commit that referenced this pull request Aug 14, 2017

@addaleax addaleax 2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](#14558)

PR-URL: #14811
56a0577

@addaleax addaleax referenced this pull request Aug 14, 2017

Merged

v8.4.0 proposal #14811

@evanlucas evanlucas added a commit that referenced this pull request Aug 15, 2017

@addaleax @evanlucas addaleax + evanlucas 2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](#14558)

PR-URL: #14811
1fe0741
Member

vsemozhetbyt commented Aug 16, 2017

@jasnell https://nodejs.org/api/http2.html has many not rendered links now (just search ][ in a browser, skipping headings).

Member

refack commented Aug 16, 2017

AFAICT the md has has broken links (or rather links with no definition in the footer) in certain areas. Some were fixed in 85d7d97

Member

refack commented Aug 16, 2017

Cross ref: #14857

@MSLaguana MSLaguana added a commit to nodejs/node-chakracore that referenced this pull request Aug 21, 2017

@addaleax @MSLaguana addaleax + MSLaguana 2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](nodejs/node#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](nodejs/node#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](nodejs/node#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](nodejs/node#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](nodejs/node#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](nodejs/node#14558)

PR-URL: nodejs/node#14811
ae5075f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment