0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

74 Commits

Author SHA1 Message Date
Evan Lucas
83d0f4c92b 2018-01-31, Version 9.5.0 (Current)
Notable changes:

* cluster
  - add cwd to cluster.settings (cjihrig) [#18399](https://github.com/nodejs/node/pull/18399)
* deps
  - upgrade libuv to 1.19.1 (cjihrig) [#18260](https://github.com/nodejs/node/pull/18260)
* meta
  - add Leko to collaborators (Leko) [#18117](https://github.com/nodejs/node/pull/18117)
  - add vdeturckheim as collaborator (vdeturckheim) [#18432](https://github.com/nodejs/node/pull/18432)
* n-api
  - expose n-api version in process.versions (Michael Dawson) [#18067](https://github.com/nodejs/node/pull/18067)
* perf_hooks
  - add performance.clear() (James M Snell) [#18046](https://github.com/nodejs/node/pull/18046)
* stream
  - avoid writeAfterEnd() while ending (陈刚) [#18170](https://github.com/nodejs/node/pull/18170)

PR-URL: https://github.com/nodejs/node/pull/18464
2018-01-31 18:06:32 -06:00
Michaël Zasso
312414662b url: expose the WHATWG URL API globally
Install URL and URLSearchParams on the global object, like they can be
found in browser environments.

PR-URL: https://github.com/nodejs/node/pull/18281
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-31 16:00:51 +01:00
Vse Mozhet Byt
5c8ce90c2f doc: unify type linkification
PR-URL: https://github.com/nodejs/node/pull/18407
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-28 03:48:27 +02:00
Peter Dalgaard-Jensen
b886c424fb doc: fix documentation of http2Stream.pushstream()
Improve documentation of callback signature of
http2Stream.pushStream() function to align with
the changes made in https://github.com/nodejs/node/pull/17406.

PR-URL: https://github.com/nodejs/node/pull/18258
Fixes: https://github.com/nodejs/node/issues/18198
Refs: https://github.com/nodejs/node/pull/17406
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-24 21:04:01 +02:00
Moritz Peters
d3600e513a
doc: fix typo in http2stream.close param default
PR-URL: https://github.com/nodejs/node/pull/18166
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-17 08:48:26 +08:00
Vse Mozhet Byt
c3fde98d4d doc: capitalize non-primitive types
PR-URL: https://github.com/nodejs/node/pull/18111
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-12 02:51:14 +02:00
James M Snell
ee2e7fcd5f http2: remember sent headers
Add sentHeaders, sentTrailers, and sentInfoHeaders properties
on `Http2Stream`.

PR-URL: https://github.com/nodejs/node/pull/18045
Fixes: https://github.com/nodejs/node/issues/16619
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-11 11:55:19 -08:00
James M Snell
47a282293f doc: fix s/rstStream/close in example
PR-URL: https://github.com/nodejs/node/pull/18088
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-11 10:14:20 -08:00
James M Snell
078b7a2a65 doc: update pushStream docs to use err first
Refs: https://github.com/nodejs/node/pull/17406#issuecomment-356661798

PR-URL: https://github.com/nodejs/node/pull/18088
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-11 10:14:14 -08:00
Myles Borins
e688175c50
2019-01-10 Version 9.4.0 (Current)
Notable change:

* async_hooks:
  - deprecate AsyncHooks Sensitive API and runInAsyncIdScope. Neither
    API were documented. (Andreas Madsen)
    https://github.com/nodejs/node/pull/16972
* deps:
  - update nghttp2 to 1.29.0 (James M Snell)
    https://github.com/nodejs/node/pull/17908
  - upgrade npm to 5.6.0 (Kat Marchán)
    https://github.com/nodejs/node/pull/17535
  - cherry-pick 50f7455 from upstream V8 (Michaël Zasso)
    https://github.com/nodejs/node/pull/16591
* events:
  - remove reaches into _events internals (Anatoli Papirovski)
    https://github.com/nodejs/node/pull/17440
* http:
  - add rawPacket in err of `clientError` event (XadillaX)
    https://github.com/nodejs/node/pull/17672
* http2:
  - implement maxSessionMemory (James M Snell)
    https://github.com/nodejs/node/pull/17967
  - add initial support for originSet (James M Snell)
    https://github.com/nodejs/node/pull/17935
  - add altsvc support (James M Snell)
    https://github.com/nodejs/node/pull/17917
  - perf_hooks integration (James M Snell)
    https://github.com/nodejs/node/pull/17906
  - Refactoring and cleanup of Http2Session and Http2Stream destroy
    (James M Snell) https://github.com/nodejs/node/pull/17406
* net:
  - remove Socket.prototype.write (Anna Henningsen)
    https://github.com/nodejs/node/pull/17644
  - remove Socket.prototype.listen (Ruben Bridgewater)
    https://github.com/nodejs/node/pull/13735
* repl:
  - show lexically scoped vars in tab completion (Michaël Zasso)
    https://github.com/nodejs/node/pull/16591
* stream:
  - rm {writeable/readable}State.length (Calvin Metcalf)
    https://github.com/nodejs/node/pull/12857
  - add flow and buffer properties to streams (Calvin Metcalf)
    https://github.com/nodejs/node/pull/12855
* util:
  - allow wildcards in NODE_DEBUG variable (Tyler)
    https://github.com/nodejs/node/pull/17609
* zlib:
  - add ArrayBuffer support (Jem Bezooyen)
    https://github.com/nodejs/node/pull/16042
* Addedew collaborator**
  - [starkwang](https://github.com/starkwang) Weijia Wang
* Addedew TSC member**
  - [danbev](https://github.com/danbev) Daniel Bevenius

PR-URL: https://github.com/nodejs/node/pull/18069
2018-01-10 10:24:22 -05:00
James M Snell
800caac236 doc: add descriptions of state properties
Fixes: https://github.com/nodejs/node/issues/15268

PR-URL: https://github.com/nodejs/node/pull/18044
Fixes: https://github.com/nodejs/node/issues/15268
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-09 16:38:06 -08:00
James M Snell
a02fcd2716 http2: use aliased buffer for perf stats, add stats
Add an aliased buffer for session and stream statistics,
add a few more metrics

PR-URL: https://github.com/nodejs/node/pull/18020
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-09 12:33:13 -08:00
Rich Trott
33123b9710 doc: grammar fixes in http2.md
PR-URL: https://github.com/nodejs/node/pull/17972
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-05 12:59:14 -08:00
James M Snell
882e7ef354 http2: implement maxSessionMemory
The maxSessionMemory is a cap for the amount of memory an
Http2Session is permitted to consume. If exceeded, new
`Http2Stream` sessions will be rejected with an
`ENHANCE_YOUR_CALM` error and existing `Http2Stream`
instances that are still receiving headers will be
terminated with an `ENHANCE_YOUR_CALM` error.

PR-URL: https://github.com/nodejs/node/pull/17967
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-05 12:35:33 -08:00
James M Snell
efdadcc193 http2: add aligned padding strategy
Add a padding strategy option that makes a best attempt to ensure
that total frame length for DATA and HEADERS frames are aligned
on multiples of 8-bytes.

PR-URL: https://github.com/nodejs/node/pull/17938
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03 12:57:18 -08:00
James M Snell
060babd665 http2: add initial support for originSet
Add new properties to `Http2Session` to identify alpnProtocol,
and indicator about whether the session is TLS or not, and
initial support for origin set (preparinng for `ORIGIN` frame
support and the client-side `Pool` implementation.

The `originSet` is the set of origins for which an `Http2Session`
may be considered authoritative. Per the `ORIGIN` frame spec,
the originSet is only valid on TLS connections, so this is only
exposed when using a `TLSSocket`.

PR-URL: https://github.com/nodejs/node/pull/17935
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-03 11:29:43 -08:00
James M Snell
ce22d6f917 http2: add altsvc support
Add support for sending and receiving ALTSVC frames.

PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03 08:45:58 -08:00
James M Snell
231b1166cf http2: perf_hooks integration
Collect and report basic timing information about `Http2Session`
and `Http2Stream` instances.

PR-URL: https://github.com/nodejs/node/pull/17906
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-02 08:56:30 -08:00
Vse Mozhet Byt
11a1bc1136 doc: replace wrong U+00A0 by common spaces
PR-URL: https://github.com/nodejs/node/pull/17940
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-01-02 01:58:15 +02:00
sreepurnajasti
27470e4ec7
doc: correct spelling
PR-URL: https://github.com/nodejs/node/pull/17911
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2017-12-30 17:59:05 +01:00
Kelvin Jin
120ea9b5c4 http2: implement ref() and unref() on client sessions
PR-URL: https://github.com/nodejs/node/pull/17620
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-28 09:32:54 -08:00
James M Snell
0babd181a0 http2: cleanup Http2Stream/Http2Session destroy
PR-URL: https://github.com/nodejs/node/pull/17406
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>

This is a significant cleanup and refactoring of the
cleanup/close/destroy logic for Http2Stream and Http2Session.
There are significant changes here in the timing and ordering
of cleanup logic, JS apis. and various related necessary edits.
2017-12-18 10:19:21 -08:00
Myles Borins
2ac4718ac4
2017-12-08, Version 8.9.3 'Carbon' (LTS)
This is a security release. All Node.js users should consult the
security release summary at
https://nodejs.org/en/blog/vulnerability/december-2017-security-releases/
for details on patched vulnerabilities.

Fixes for the following CVEs are included in this release:

* CVE-2017-15896
* CVE-2017-15897
* CVE-2017-3738 (from the openssl project)

Notable Changes:

* buffer:
  * buffer allocated with an invalid content will now be zero filled
    (Anna Henningsen)
    https://github.com/nodejs/node/pull/17428
* deps:
  * openssl updated to 1.0.2n (Shigeki Ohtsu)
    https://github.com/nodejs/node/pull/17526

PR-URL: https://github.com/nodejs/node/pull/17532
2017-12-08 11:00:55 -05:00
Rich Trott
ff9a6bc1f3 doc: add missing serial commas
PR-URL: https://github.com/nodejs/node/pull/17384
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 14:46:36 -08:00
James M Snell
1b99542ea4 http2: use 'close' event instead of 'streamClosed'
PR-URL: https://github.com/nodejs/node/pull/17328
Fixes: https://github.com/nodejs/node/issues/15303
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-28 10:30:39 -08:00
James M Snell
cc7fe60321 doc: caution against removing pseudoheaders
PR-URL: https://github.com/nodejs/node/pull/17329
Fixes: https://github.com/nodejs/node/issues/15312
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-11-27 12:05:50 -08:00
James M Snell
69e6c5a212
http2: major update to internals
This update does several significant things:

1. It eliminates the base Nghttp2* classes and folds those
   in to node::http2::Http2Session and node::http2::Http2Stream
2. It makes node::http2::Http2Stream a StreamBase instance and
   sends that out to JS-land to act as the [kHandle] for the
   JavaScript Http2Stream class.
3. It shifts some of the callbacks from C++ off of the JavaScript
   Http2Session class to the Http2Stream class.
4. It refactors the data provider structure for FD and Stream
   based sending to help encapsulate those functions easier
5. It streamlines some of the functions at the C++ layer to
   eliminate now unnecessary redirections
6. It cleans up node_http2.cc for better readability and
   maintainability
7. It refactors some of the debug output
8. Because Http2Stream instances are now StreamBases, they are
   now also trackable using async-hooks
9. The Stream::OnRead algorithm has been simplified with a
   couple bugs fixed.
10. I've eliminated node_http2_core.h and node_http2_core-inl.h
11. Detect invalid handshake a report protocol error to session
12. Refactor out of memory error, improve other errors
13. Add Http2Session.prototype.ping

PR-URL: https://github.com/nodejs/node/pull/17105
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-21 12:47:54 +01:00
Luigi Pinca
97ba69f915 doc: add missing introduced_in comments
Add missing "introduced_in" comments for alternative version links.

PR-URL: https://github.com/nodejs/node/pull/16741
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-11-19 18:10:05 +01:00
Gus Caplan
29de91b64f doc: fix typo in http2 doc
`Sesssion` -> `Session`

PR-URL: https://github.com/nodejs/node/pull/16993
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-13 11:30:48 -08:00
Vipin Menon
116f499f4c doc: remove duplicate 'the' from http2 API doc
PR-URL: https://github.com/nodejs/node/pull/16924
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-11-11 11:16:44 +01:00
cjihrig
a77bfcaac7
2017-11-07, Version 9.1.0 (Current)
Notable changes:

* CLI:
  - NODE_OPTIONS now supports the --stack-trace-limit option.
    https://github.com/nodejs/node/pull/16495
* deps:
  - OpenSSL is upgraded to 1.0.2m
    https://github.com/nodejs/node/pull/16691
* http:
  - A 'connect' event handler leak has been fixed.
    https://github.com/nodejs/node/pull/16725
  - The 103 Early Hints status code is now supported.
    https://github.com/nodejs/node/pull/16644

PR-URL: https://github.com/nodejs/node/pull/16851
2017-11-07 12:58:56 -05:00
James M Snell
9f3d59eabb http2: refactor multiple internals
* eliminate pooling of Nghttp2Stream instances. After testing,
  the pooling is not having any tangible benefit
  and makes things more complicated. Simplify. Simplify.

* refactor inbound headers

* Enforce MAX_HEADERS_LIST setting and limit the number of header
  pairs accepted from the peer. Use the ENHANCE_YOUR_CALM error
  code when receiving either too many headers or too many octets.
  Use a vector to store the headers instead of a queue

PR-URL: https://github.com/nodejs/node/pull/16676
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-11-04 22:32:44 -07:00
Matej Krajčovič
571c04b07a
doc: make default values and periods consistent
PR-URL: https://github.com/nodejs/node/pull/16563
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-30 11:08:47 +01:00
Anatoli Papirovski
8a9be4175b
doc: http2.connect accepts net & tls options
PR-URL: https://github.com/nodejs/node/pull/16576
Fixes: https://github.com/nodejs/node/issues/15405
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-29 12:53:32 -04:00
Sebastiaan Deckers
a0f7ae6c41
doc: remove http2 pushStream weight option
The PRIORITY field is only supported by HTTP/2 in a HEADERS frame
initiated by the client, not in a push request sent by the server.

Documents the recommended approach to set a silent priority as
used internally by nghttp2.

PR-URL: https://github.com/nodejs/node/pull/16451
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-27 10:59:11 -04:00
Jacob Hoffman-Andrews
3621889c80
doc: improve http2 documentation
Provide section headings for server-side and client side examples.
Add error handling and TLS to server-side example, following example
of `https`. Add error handling, TLS, more efficient Buffer usage,
and header printing to client example.

PR-URL: https://github.com/nodejs/node/pull/16366
Fixes: https://github.com/nodejs/node/issues/16345
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-10-25 13:21:39 -04:00
Anatoli Papirovski
73533a1932
http2: do not allow socket manipulation
Because of the specific serialization and processing requirements
of HTTP/2, sockets should not be directly manipulated. This
forbids any interactions with destroy, emit, end, pause, read,
resume and write methods of the socket. It also redirects
setTimeout to session instead of socket.

PR-URL: https://github.com/nodejs/node/pull/16330
Fixes: https://github.com/nodejs/node/issues/16252
Refs: https://github.com/nodejs/node/pull/16211
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-25 12:50:44 -04:00
Anna Henningsen
ab16eec436
http2: support generic Duplex streams
Support generic `Duplex` streams through using `StreamWrap`
on the server and client sides, and adding a `createConnection`
method option similar to what the HTTP/1 API provides.

Since HTTP2 is, as a protocol, independent of its underlying transport
layer, Node.js should not enforce any restrictions on what streams
its internals may use.

Ref: https://github.com/nodejs/node/issues/16256
PR-URL: https://github.com/nodejs/node/pull/16269
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-23 16:50:44 +02:00
c0b
ba4a0a6f5f
doc: fix http2 example with rstWithCancel
Replace the non-existent method rstStreamWithCancel with rstWithCancel

PR-URL: https://github.com/nodejs/node/pull/16365
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-23 10:22:45 -04:00
Vse Mozhet Byt
f8ef2e2bf9 doc: fix links in http2.md
PR-URL: https://github.com/nodejs/node/pull/16307
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-19 12:51:42 +03:00
Vse Mozhet Byt
f88178906b doc: fix some links
PR-URL: https://github.com/nodejs/node/pull/16202
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-15 02:02:08 +03:00
Adarsh Honawad
a84e10eba0 doc: remove undefined reference variable
Remove undefined reference variable 'common' from http2 API

PR-URL: https://github.com/nodejs/node/pull/16106
Fixes: https://github.com/nodejs/node/issues/16068
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-12 22:02:56 +08:00
Daniela Borges Matos de Carvalho
ce4903426d doc: fix http2 API docs typos
PR-URL: https://github.com/nodejs/node/pull/15778
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-07 09:30:08 -07:00
Anatoli Papirovski
2da7d9b820 http2: near full http1 compatibility, add tests
Extensive re-work of http1 compatibility layer based on tests in
express, on-finished and finalhandler. Fix handling of HEAD
method to match http1. Adjust write, end, etc. to call writeHead
as in http1 and as expected by user-land modules. Add socket
proxy that instead uses the Http2Stream for the vast majority of
socket interactions. Add and change tests to closer represent
http1 behaviour.

Refs: https://github.com/nodejs/node/pull/15633
Refs: https://github.com/expressjs/express/tree/master/test
Refs: https://github.com/jshttp/on-finished/blob/master/test/test.js
Refs: https://github.com/pillarjs/finalhandler/blob/master/test/test.js
PR-URL: https://github.com/nodejs/node/pull/15702
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-10-06 14:04:22 -07:00
James M Snell
f55ee6e24a
http2: make --expose-http2 flag a non-op
Make the `http2` module always available.
The `--expose-http2` cli flag is made a non-op

PR-URL: https://github.com/nodejs/node/pull/15535
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-28 02:01:06 -03:00
Antoine AMARA
51bc7fa598
doc: fix mistake in http2stream.respondWithFile.
http2stream.respondWithFile api has changed since 8.5.0 with the
addition of the onError option. In the first code example an
onError function is implemented but never used, fix this
mistake.

Add a description to have more informations when onError is triggered.

PR-URL: https://github.com/nodejs/node/pull/15501
Fixes: https://github.com/nodejs/node/issues/15390
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-27 20:40:18 -03:00
Vse Mozhet Byt
6763fb2f0e doc: fix some links in http2.md
PR-URL: https://github.com/nodejs/node/pull/15481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-20 22:43:56 +03:00
Myles Borins
a10856a7d3
2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  https://github.com/nodejs/node/pull/14875

* console:
  * Implement minimal `console.group()`.
  https://github.com/nodejs/node/pull/14910

* deps:
  * upgrade libuv to 1.14.1
    https://github.com/nodejs/node/pull/14866
  * update nghttp2 to v1.25.0
    https://github.com/nodejs/node/pull/14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    https://github.com/nodejs/node/pull/14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    https://github.com/nodejs/node/pull/15034

* inspector:
  * Enable async stack traces
    https://github.com/nodejs/node/pull/13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    https://github.com/nodejs/node/pull/14369

* napi:
  * implement promise
    https://github.com/nodejs/node/pull/14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    https://github.com/nodejs/node/pull/14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    https://github.com/nodejs/node/pull/14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](https://github.com/nodejs/node/pull/14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

PR-URL: https://github.com/nodejs/node/pull/15308
2017-09-12 17:34:51 +02:00
Vse Mozhet Byt
da057dbf8f doc: fix some internal links
PR-URL: https://github.com/nodejs/node/pull/15293
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-09-12 17:03:30 +03:00
Piotr Mionskowski
ec599b87ae
doc: readFileSync instead of fs.readFileSync
The ALPN negotiation sample uses `fs.readFileSync` whereas
`readFileSync` is imported into top level variable.

PR-URL: https://github.com/nodejs/node/pull/15137
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-01 17:14:21 -04:00