Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.17.1 proposal #26684

Merged
merged 8 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.17.0">6.17.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.17.1">6.17.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.17.0">6.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.16.0">6.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.15.1">6.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.15.0">6.15.0</a><br/>
Expand Down
8 changes: 2 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Code of Conduct

The Node.js Code of Conduct document has moved to
https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md. Please update
links to this document accordingly.

The Node.js Moderation policy can be found at
https://github.com/nodejs/admin/blob/master/Moderation-Policy.md
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,7 @@ PKG=$(TARNAME).pkg
MACOSOUTDIR=out/macos

release-only:
@if [ "$(DISTTYPE)" != "nightly" ] && [ "$(DISTTYPE)" != "next-nightly" ] && \
`grep -q REPLACEME doc/api/*.md`; then \
@if [ "$(DISTTYPE)" = "release" ] && `grep -q REPLACEME doc/api/*.md`; then \
echo 'Please update REPLACEME in Added: tags in doc/api/*.md (See doc/releases.md)' ; \
exit 1 ; \
fi
Expand Down
24 changes: 22 additions & 2 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@
['OS=="aix"', {
'cflags': [ '-gxcoff' ],
'ldflags': [ '-Wl,-bbigtoc' ],
'conditions': [
['target_arch=="ppc64"', {
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:'
'/opt/freeware/lib/pthread/ppc64'
],
}],
['target_arch=="ppc"', {
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
],
}],
],
}],
['OS == "android"', {
'cflags': [ '-fPIE' ],
Expand Down Expand Up @@ -332,11 +345,18 @@
[ 'OS=="aix"', {
'conditions': [
[ 'target_arch=="ppc"', {
'ldflags': [ '-Wl,-bmaxdata:0x60000000/dsa' ],
'ldflags': [
'-Wl,-bmaxdata:0x60000000/dsa',
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread',
],
}],
[ 'target_arch=="ppc64"', {
'cflags': [ '-maix64' ],
'ldflags': [ '-maix64' ],
'ldflags': [
'-maix64',
'-Wl,-blibpath:/usr/lib:/lib:'
'/opt/freeware/lib/pthread/ppc64',
],
}],
],
'ldflags': [ '-Wl,-bbigtoc' ],
Expand Down
18 changes: 18 additions & 0 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ Tells the kernel to join a multicast group at the given `multicastAddress` and
one interface and will add membership to it. To add membership to every
available interface, call `addMembership` multiple times, once per interface.

When sharing a UDP socket across multiple `cluster` workers, the
`socket.addMembership()` function must be called only once or an
`EADDRINUSE` error will occur:

```js
const cluster = require('cluster');
const dgram = require('dgram');
if (cluster.isMaster) {
cluster.fork(); // Works ok.
cluster.fork(); // Fails with EADDRINUSE.
} else {
const s = dgram.createSocket('udp4');
s.bind(1234, () => {
s.addMembership('224.0.0.114');
});
}
```

### socket.address()
<!-- YAML
added: v0.1.99
Expand Down
21 changes: 21 additions & 0 deletions doc/changelogs/CHANGELOG_V6.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</tr>
<tr>
<td valign="top">
<a href="#6.17.1">6.17.1</a><br/>
<a href="#6.17.0">6.17.0</a><br/>
<a href="#6.16.0">6.16.0</a><br/>
<a href="#6.15.1">6.15.1</a><br/>
Expand Down Expand Up @@ -69,6 +70,26 @@
[Node.js Long Term Support Plan](https://github.com/nodejs/LTS) and
will be supported actively until April 2018 and maintained until April 2019.

<a id="6.17.1"></a>
## 2019-04-03, Version 6.17.1 'Boron' (LTS), @BethGriggs

Node 6 is due to go End-of-Life on 2019-04-30.

### Notable Changes

* **http**:
- fix error check in `Execute()` (Brian White) [#25939](https://github.com/nodejs/node/pull/25939)

### Commits

* [[`c9d21a0c10`](https://github.com/nodejs/node/commit/c9d21a0c10)] - **build**: set `-blibpath:` for AIX (Richard Lau) [#25447](https://github.com/nodejs/node/pull/25447)
* [[`9ba5fd6bad`](https://github.com/nodejs/node/commit/9ba5fd6bad)] - **build**: only check REPLACEME & DEP...X for releases (Rod Vagg) [#24575](https://github.com/nodejs/node/pull/24575)
* [[`1371a6f88b`](https://github.com/nodejs/node/commit/1371a6f88b)] - **doc**: simplify CODE\_OF\_CONDUCT.md (Rich Trott) [#23989](https://github.com/nodejs/node/pull/23989)
* [[`ad62971573`](https://github.com/nodejs/node/commit/ad62971573)] - **doc**: document that addMembership must be called once in a cluster (James M Snell) [#23746](https://github.com/nodejs/node/pull/23746)
* [[`8080a9bf40`](https://github.com/nodejs/node/commit/8080a9bf40)] - **http**: fix error check in `Execute()` (Brian White) [#25939](https://github.com/nodejs/node/pull/25939)
* [[`aedc7120ea`](https://github.com/nodejs/node/commit/aedc7120ea)] - **src**: fix bootstrap\_node on bsd (sylkat) [#22663](https://github.com/nodejs/node/pull/22663)
* [[`b5d464955a`](https://github.com/nodejs/node/commit/b5d464955a)] - **test**: fix test-repl-envvars (Anna Henningsen) [#25226](https://github.com/nodejs/node/pull/25226)

<a id="6.17.0"></a>
## 2018-02-28, Version 6.17.0 'Boron' (LTS), @rvagg

Expand Down
2 changes: 1 addition & 1 deletion lib/internal/bootstrap_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
// get the full path before process.execPath is used.
if (process.platform === 'openbsd') {
const { realpathSync } = NativeModule.require('fs');
process.execPath = realpathSync.native(process.execPath);
process.execPath = realpathSync(process.execPath);
}

Object.defineProperty(process, 'argv0', {
Expand Down
30 changes: 28 additions & 2 deletions src/node_http_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,28 @@ class Parser : public AsyncWrap {
size_t nparsed =
http_parser_execute(&parser_, &settings, data, len);

Save();
enum http_errno err = HTTP_PARSER_ERRNO(&parser_);

// Finish()
if (data == nullptr) {
// `http_parser_execute()` returns either `0` or `1` when `len` is 0
// (part of the finishing sequence).
CHECK_EQ(len, 0);
switch (nparsed) {
case 0:
err = HPE_OK;
break;
case 1:
nparsed = 0;
break;
default:
UNREACHABLE();
}

// Regular Execute()
} else {
Save();
}

// Unassign the 'buffer_' variable
current_buffer_.Clear();
Expand All @@ -624,7 +645,7 @@ class Parser : public AsyncWrap {
Local<Integer> nparsed_obj = Integer::New(env()->isolate(), nparsed);
// If there was a parse error in one of the callbacks
// TODO(bnoordhuis) What if there is an error on EOF?
if (!parser_.upgrade && nparsed != len) {
if (!parser_.upgrade && err != HPE_OK) {
enum http_errno err = HTTP_PARSER_ERRNO(&parser_);

Local<Value> e = Exception::Error(env()->parse_error_string());
Expand All @@ -635,6 +656,11 @@ class Parser : public AsyncWrap {

return scope.Escape(e);
}

// No return value is needed for `Finish()`
if (data == nullptr) {
return scope.Escape(Local<Value>());
}
return scope.Escape(nparsed_obj);
}

Expand Down
2 changes: 1 addition & 1 deletion src/node_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define NODE_VERSION_IS_LTS 1
#define NODE_VERSION_LTS_CODENAME "Boron"

#define NODE_VERSION_IS_RELEASE 0
#define NODE_VERSION_IS_RELEASE 1

#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
Expand Down
15 changes: 14 additions & 1 deletion test/parallel/test-http-max-header-size.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('../common');
const common = require('../common');
const assert = require('assert');
const { spawnSync } = require('child_process');
const http = require('http');
Expand All @@ -9,3 +9,16 @@ assert.strictEqual(http.maxHeaderSize, 8 * 1024);
const child = spawnSync(process.execPath, ['--max-http-header-size=10', '-p',
'http.maxHeaderSize']);
assert.strictEqual(+child.stdout.toString().trim(), 10);

{
const server = http.createServer(common.mustNotCall());
server.listen(0, common.mustCall(() => {
http.get({
port: server.address().port,
headers: { foo: 'x'.repeat(http.maxHeaderSize + 1) }
}, common.mustNotCall()).once('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
server.close();
}));
}));
}
2 changes: 1 addition & 1 deletion test/parallel/test-repl-envvars.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const tests = [
];

function run(test) {
const env = Object.assign({}, process.env, test.env);
const env = test.env;
const expected = test.expected;
const opts = {
terminal: true,
Expand Down