From 3294d1bf62d43071f84ed8eff2c2676ade0d3b64 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 22 May 2018 12:10:53 +0200 Subject: [PATCH] src: remove --expose-http2 option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the --expose-http2 option. In the code comment it states that this should should be noop through v9.x, and it sounds like it can be removed for 10.x and above. PR-URL: https://github.com/nodejs/node/pull/20887 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Benjamin Gruenbaum Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- benchmark/http2/headers.js | 2 +- benchmark/http2/respond-with-fd.js | 2 +- benchmark/http2/simple.js | 2 +- benchmark/http2/write.js | 2 +- src/node.cc | 4 ---- .../parallel/test-http2-https-fallback-http-server-options.js | 1 - 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/benchmark/http2/headers.js b/benchmark/http2/headers.js index ad1eb50007a92d..beb1d31b71338f 100644 --- a/benchmark/http2/headers.js +++ b/benchmark/http2/headers.js @@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, { n: [1e3], nheaders: [0, 10, 100, 1000], benchmarker: ['h2load'] -}, { flags: ['--no-warnings', '--expose-http2'] }); +}, { flags: ['--no-warnings'] }); function main({ n, nheaders }) { const http2 = require('http2'); diff --git a/benchmark/http2/respond-with-fd.js b/benchmark/http2/respond-with-fd.js index cc9992e8ca0bd5..3415a9c69f13ec 100644 --- a/benchmark/http2/respond-with-fd.js +++ b/benchmark/http2/respond-with-fd.js @@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, { streams: [100, 200, 1000], clients: [1, 2], benchmarker: ['h2load'] -}, { flags: ['--no-warnings', '--expose-http2'] }); +}, { flags: ['--no-warnings'] }); function main({ requests, streams, clients }) { fs.open(file, 'r', (err, fd) => { diff --git a/benchmark/http2/simple.js b/benchmark/http2/simple.js index cf017e6735411e..f4598b81560230 100644 --- a/benchmark/http2/simple.js +++ b/benchmark/http2/simple.js @@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, { streams: [100, 200, 1000], clients: [1, 2], benchmarker: ['h2load'] -}, { flags: ['--no-warnings', '--expose-http2'] }); +}, { flags: ['--no-warnings'] }); function main({ requests, streams, clients }) { const http2 = require('http2'); diff --git a/benchmark/http2/write.js b/benchmark/http2/write.js index 6fcb1254ca3f05..fc3203c6e55451 100644 --- a/benchmark/http2/write.js +++ b/benchmark/http2/write.js @@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, { length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024], size: [100000], benchmarker: ['h2load'] -}, { flags: ['--no-warnings', '--expose-http2'] }); +}, { flags: ['--no-warnings'] }); function main({ streams, length, size }) { const http2 = require('http2'); diff --git a/src/node.cc b/src/node.cc index 86f4b91b59833e..fc33543a6acc62 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3358,7 +3358,6 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env, "--experimental-modules", "--experimental-repl-await", "--experimental-vm-modules", - "--expose-http2", // keep as a non-op through v9.x "--force-fips", "--icu-data-dir", "--inspect", @@ -3608,9 +3607,6 @@ static void ParseArgs(int* argc, } else if (strcmp(arg, "--expose-internals") == 0 || strcmp(arg, "--expose_internals") == 0) { config_expose_internals = true; - } else if (strcmp(arg, "--expose-http2") == 0 || - strcmp(arg, "--expose_http2") == 0) { - // Keep as a non-op through v9.x } else if (strcmp(arg, "-") == 0) { break; } else if (strcmp(arg, "--") == 0) { diff --git a/test/parallel/test-http2-https-fallback-http-server-options.js b/test/parallel/test-http2-https-fallback-http-server-options.js index 20e2b122a24e8c..8143f56d491ccc 100644 --- a/test/parallel/test-http2-https-fallback-http-server-options.js +++ b/test/parallel/test-http2-https-fallback-http-server-options.js @@ -1,4 +1,3 @@ -// Flags: --expose-http2 'use strict'; const common = require('../common');