Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/v10.x' into v10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarnung committed Apr 13, 2018
2 parents 8b9997a + dfea13a commit 0a98060
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 11 deletions.
16 changes: 16 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,17 @@
'msvs_configuration_platform': 'ARM',
}],
['OS=="aix"', {
'variables': {'real_os_name': '<!(uname -s)',},
'cflags': [ '-gxcoff' ],
'ldflags': [ '-Wl,-bbigtoc' ],
'conditions': [
['"<(real_os_name)"=="OS400"', {
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-brtl',
],
}],
],
}],
['OS == "android"', {
'cflags': [ '-fPIE' ],
Expand Down Expand Up @@ -400,6 +409,7 @@
'ldflags!': [ '-pthread' ],
}],
[ 'OS=="aix"', {
'variables': {'real_os_name': '<!(uname -s)',},
'conditions': [
[ 'target_arch=="ppc"', {
'ldflags': [ '-Wl,-bmaxdata:0x60000000/dsa' ],
Expand All @@ -408,6 +418,12 @@
'cflags': [ '-maix64' ],
'ldflags': [ '-maix64' ],
}],
['"<(real_os_name)"=="OS400"', {
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-brtl',
],
}],
],
'ldflags': [ '-Wl,-bbigtoc' ],
'ldflags!': [ '-rdynamic' ],
Expand Down
18 changes: 9 additions & 9 deletions doc/api/zlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Compression strategy.
* `zlib.constants.Z_FIXED`
* `zlib.constants.Z_DEFAULT_STRATEGY`

## Class Options
## Class: Options
<!-- YAML
added: v0.11.1
changes:
Expand Down Expand Up @@ -473,14 +473,14 @@ Provides an object enumerating Zlib-related constants.
added: v0.5.8
-->

Creates and returns a new [Deflate][] object with the given [options][].
Creates and returns a new [Deflate][] object with the given [`options`][].

## zlib.createDeflateRaw([options])
<!-- YAML
added: v0.5.8
-->

Creates and returns a new [DeflateRaw][] object with the given [options][].
Creates and returns a new [DeflateRaw][] object with the given [`options`][].

An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when windowBits
is set to 8 for raw deflate streams. zlib would automatically set windowBits
Expand All @@ -494,35 +494,35 @@ that effectively uses an 8-bit window only.
added: v0.5.8
-->

Creates and returns a new [Gunzip][] object with the given [options][].
Creates and returns a new [Gunzip][] object with the given [`options`][].

## zlib.createGzip([options])
<!-- YAML
added: v0.5.8
-->

Creates and returns a new [Gzip][] object with the given [options][].
Creates and returns a new [Gzip][] object with the given [`options`][].

## zlib.createInflate([options])
<!-- YAML
added: v0.5.8
-->

Creates and returns a new [Inflate][] object with the given [options][].
Creates and returns a new [Inflate][] object with the given [`options`][].

## zlib.createInflateRaw([options])
<!-- YAML
added: v0.5.8
-->

Creates and returns a new [InflateRaw][] object with the given [options][].
Creates and returns a new [InflateRaw][] object with the given [`options`][].

## zlib.createUnzip([options])
<!-- YAML
added: v0.5.8
-->

Creates and returns a new [Unzip][] object with the given [options][].
Creates and returns a new [Unzip][] object with the given [`options`][].

## Convenience Methods

Expand Down Expand Up @@ -771,14 +771,14 @@ Decompress a chunk of data with [Unzip][].
[`Content-Encoding`]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
[`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
[`options`]: #zlib_class_options
[DeflateRaw]: #zlib_class_zlib_deflateraw
[Deflate]: #zlib_class_zlib_deflate
[Gunzip]: #zlib_class_zlib_gunzip
[Gzip]: #zlib_class_zlib_gzip
[InflateRaw]: #zlib_class_zlib_inflateraw
[Inflate]: #zlib_class_zlib_inflate
[Memory Usage Tuning]: #zlib_memory_usage_tuning
[options]: #zlib_class_options
[Unzip]: #zlib_class_zlib_unzip
[`UV_THREADPOOL_SIZE`]: cli.html#cli_uv_threadpool_size_size
[`zlib.bytesWritten`]: #zlib_zlib_byteswritten
Expand Down
4 changes: 3 additions & 1 deletion lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,9 @@ function domainToUnicode(domain) {
function urlToOptions(url) {
var options = {
protocol: url.protocol,
hostname: url.hostname,
hostname: url.hostname.startsWith('[') ?
url.hostname.slice(1, -1) :
url.hostname,
hash: url.hash,
search: url.search,
pathname: url.pathname,
Expand Down
10 changes: 9 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,7 @@

'conditions': [
[ 'OS=="aix" and node_shared=="true"', {
'variables': {'real_os_name': '<!(uname -s)',},
'targets': [
{
'target_name': 'node_aix_shared',
Expand All @@ -1069,7 +1070,14 @@
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
],
}]
}],
['"<(real_os_name)"=="OS400"', {
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-bbigtoc',
'-Wl,-brtl',
],
}],
],
'includes': [
'node.gypi'
Expand Down
37 changes: 37 additions & 0 deletions test/internet/test-inspector-help-page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict';
const common = require('../common');

common.skipIfInspectorDisabled();

if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');
const https = require('https');
const { spawnSync } = require('child_process');
const child = spawnSync(process.execPath, ['--inspect', '-e', '""']);
const stderr = child.stderr.toString();
const helpUrl = stderr.match(/For help, see: (.+)/)[1];

function check(url, cb) {
https.get(url, common.mustCall((res) => {
assert(res.statusCode >= 200 && res.statusCode < 400);

if (res.statusCode >= 300)
return check(res.headers.location, cb);

let result = '';

res.setEncoding('utf8');
res.on('data', (data) => {
result += data;
});

res.on('end', common.mustCall(() => {
assert(/>Debugging Guide</.test(result));
cb();
}));
})).on('error', common.mustNotCall);
}

check(helpUrl, common.mustCall());
3 changes: 3 additions & 0 deletions test/parallel/test-whatwg-url-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ assert.strictEqual(url.searchParams, oldParams);
assert.strictEqual(opts.pathname, '/aaa/zzz');
assert.strictEqual(opts.search, '?l=24');
assert.strictEqual(opts.hash, '#test');

const { hostname } = urlToOptions(new URL('http://[::1]:21'));
assert.strictEqual(hostname, '::1');
}

// Test special origins
Expand Down

0 comments on commit 0a98060

Please sign in to comment.