From f55ee6e24a4073be42957bd9dbeb8b2591544143 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 21 Sep 2017 10:07:56 -0700 Subject: [PATCH] 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 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Ruben Bridgewater --- benchmark/http2/headers.js | 2 +- benchmark/http2/respond-with-fd.js | 2 +- benchmark/http2/simple.js | 2 +- benchmark/http2/write.js | 2 +- doc/api/cli.md | 7 ------- doc/api/http2.md | 3 --- doc/node.1 | 4 ---- lib/internal/bootstrap_node.js | 3 --- lib/internal/module.js | 6 +----- src/node.cc | 8 ++------ src/node_config.cc | 3 --- src/node_internals.h | 2 -- test/parallel/test-http2-binding.js | 1 - test/parallel/test-http2-client-data-end.js | 1 - test/parallel/test-http2-client-destroy-before-connect.js | 1 - test/parallel/test-http2-client-destroy-before-request.js | 1 - test/parallel/test-http2-client-destroy-goaway.js | 1 - test/parallel/test-http2-client-destroy.js | 1 - test/parallel/test-http2-client-onconnect-errors.js | 1 - .../parallel/test-http2-client-priority-before-connect.js | 1 - test/parallel/test-http2-client-promisify-connect.js | 1 - test/parallel/test-http2-client-request-options-errors.js | 1 - .../test-http2-client-rststream-before-connect.js | 1 - test/parallel/test-http2-client-set-priority.js | 1 - .../parallel/test-http2-client-settings-before-connect.js | 1 - .../parallel/test-http2-client-shutdown-before-connect.js | 1 - test/parallel/test-http2-client-socket-destroy.js | 1 - .../test-http2-client-stream-destroy-before-connect.js | 1 - test/parallel/test-http2-client-unescaped-path.js | 1 - test/parallel/test-http2-client-upload.js | 1 - test/parallel/test-http2-client-write-before-connect.js | 1 - test/parallel/test-http2-compat-errors.js | 2 +- test/parallel/test-http2-compat-expect-continue-check.js | 1 - test/parallel/test-http2-compat-expect-continue.js | 1 - test/parallel/test-http2-compat-expect-handling.js | 1 - test/parallel/test-http2-compat-method-connect.js | 1 - test/parallel/test-http2-compat-serverrequest-end.js | 1 - test/parallel/test-http2-compat-serverrequest-headers.js | 1 - test/parallel/test-http2-compat-serverrequest-pause.js | 1 - test/parallel/test-http2-compat-serverrequest-pipe.js | 1 - .../test-http2-compat-serverrequest-settimeout.js | 1 - test/parallel/test-http2-compat-serverrequest-trailers.js | 1 - test/parallel/test-http2-compat-serverrequest.js | 1 - test/parallel/test-http2-compat-serverresponse-close.js | 2 +- ...test-http2-compat-serverresponse-createpushresponse.js | 1 - test/parallel/test-http2-compat-serverresponse-destroy.js | 1 - test/parallel/test-http2-compat-serverresponse-drain.js | 1 - test/parallel/test-http2-compat-serverresponse-end.js | 1 - .../parallel/test-http2-compat-serverresponse-finished.js | 1 - .../test-http2-compat-serverresponse-flushheaders.js | 1 - test/parallel/test-http2-compat-serverresponse-headers.js | 1 - .../test-http2-compat-serverresponse-settimeout.js | 1 - .../test-http2-compat-serverresponse-statuscode.js | 1 - ...p2-compat-serverresponse-statusmessage-property-set.js | 1 - ...-http2-compat-serverresponse-statusmessage-property.js | 1 - .../test-http2-compat-serverresponse-statusmessage.js | 1 - .../parallel/test-http2-compat-serverresponse-trailers.js | 1 - .../test-http2-compat-serverresponse-write-no-cb.js | 1 - .../test-http2-compat-serverresponse-writehead.js | 1 - test/parallel/test-http2-connect-method.js | 1 - test/parallel/test-http2-connect.js | 1 - test/parallel/test-http2-cookies.js | 1 - test/parallel/test-http2-create-client-connect.js | 1 - test/parallel/test-http2-create-client-secure-session.js | 1 - test/parallel/test-http2-create-client-session.js | 1 - test/parallel/test-http2-createsecureserver-nooptions.js | 1 - test/parallel/test-http2-createwritereq.js | 1 - test/parallel/test-http2-date-header.js | 1 - test/parallel/test-http2-dont-override.js | 1 - test/parallel/test-http2-getpackedsettings.js | 1 - test/parallel/test-http2-goaway-opaquedata.js | 1 - test/parallel/test-http2-head-request.js | 1 - test/parallel/test-http2-https-fallback.js | 1 - test/parallel/test-http2-info-headers.js | 1 - test/parallel/test-http2-max-concurrent-streams.js | 1 - test/parallel/test-http2-methods.js | 1 - test/parallel/test-http2-misused-pseudoheaders.js | 1 - test/parallel/test-http2-multi-content-length.js | 1 - test/parallel/test-http2-multiheaders-raw.js | 1 - test/parallel/test-http2-multiheaders.js | 1 - test/parallel/test-http2-multiplex.js | 1 - test/parallel/test-http2-noflag.js | 8 -------- .../test-http2-options-max-headers-block-length.js | 1 - test/parallel/test-http2-options-max-reserved-streams.js | 1 - test/parallel/test-http2-padding-callback.js | 1 - test/parallel/test-http2-priority-event.js | 1 - test/parallel/test-http2-request-response-proto.js | 1 - test/parallel/test-http2-respond-file-204.js | 1 - test/parallel/test-http2-respond-file-304.js | 1 - test/parallel/test-http2-respond-file-404.js | 1 - test/parallel/test-http2-respond-file-compat.js | 1 - test/parallel/test-http2-respond-file-error-dir.js | 1 - test/parallel/test-http2-respond-file-errors.js | 1 - test/parallel/test-http2-respond-file-fd-errors.js | 1 - test/parallel/test-http2-respond-file-fd-invalid.js | 1 - test/parallel/test-http2-respond-file-fd-range.js | 1 - test/parallel/test-http2-respond-file-fd.js | 1 - test/parallel/test-http2-respond-file-push.js | 1 - test/parallel/test-http2-respond-file-range.js | 1 - test/parallel/test-http2-respond-file.js | 1 - test/parallel/test-http2-respond-no-data.js | 1 - test/parallel/test-http2-response-splitting.js | 1 - test/parallel/test-http2-serve-file.js | 1 - .../test-http2-server-destroy-before-additional.js | 1 - .../parallel/test-http2-server-destroy-before-priority.js | 1 - test/parallel/test-http2-server-destroy-before-push.js | 1 - test/parallel/test-http2-server-destroy-before-respond.js | 1 - test/parallel/test-http2-server-destroy-before-rst.js | 1 - test/parallel/test-http2-server-destroy-before-state.js | 1 - test/parallel/test-http2-server-destroy-before-write.js | 1 - test/parallel/test-http2-server-errors.js | 2 +- test/parallel/test-http2-server-push-disabled.js | 1 - .../parallel/test-http2-server-push-stream-errors-args.js | 1 - test/parallel/test-http2-server-push-stream-errors.js | 1 - test/parallel/test-http2-server-push-stream-head.js | 1 - test/parallel/test-http2-server-push-stream.js | 1 - test/parallel/test-http2-server-rst-before-respond.js | 1 - test/parallel/test-http2-server-rst-stream.js | 1 - test/parallel/test-http2-server-set-header.js | 1 - test/parallel/test-http2-server-settimeout-no-callback.js | 1 - .../parallel/test-http2-server-shutdown-before-respond.js | 1 - test/parallel/test-http2-server-socket-destroy.js | 1 - test/parallel/test-http2-server-socketerror.js | 1 - test/parallel/test-http2-server-startup.js | 1 - test/parallel/test-http2-server-timeout.js | 1 - test/parallel/test-http2-session-settings.js | 1 - test/parallel/test-http2-session-stream-state.js | 1 - test/parallel/test-http2-single-headers.js | 1 - test/parallel/test-http2-status-code-invalid.js | 1 - test/parallel/test-http2-status-code.js | 1 - test/parallel/test-http2-stream-client.js | 1 - test/parallel/test-http2-timeouts.js | 1 - test/parallel/test-http2-too-many-settings.js | 1 - test/parallel/test-http2-trailers.js | 1 - test/parallel/test-http2-util-asserts.js | 2 +- test/parallel/test-http2-util-headers-list.js | 2 +- test/parallel/test-http2-window-size.js | 1 - test/parallel/test-http2-withflag.js | 1 - test/parallel/test-http2-write-callbacks.js | 1 - test/parallel/test-http2-write-empty-string.js | 1 - test/parallel/test-http2-zero-length-write.js | 1 - test/sequential/test-http2-session-timeout.js | 1 - 142 files changed, 12 insertions(+), 174 deletions(-) delete mode 100644 test/parallel/test-http2-noflag.js diff --git a/benchmark/http2/headers.js b/benchmark/http2/headers.js index dc2fb3a0a1..f6b29347cd 100644 --- a/benchmark/http2/headers.js +++ b/benchmark/http2/headers.js @@ -6,7 +6,7 @@ const PORT = common.PORT; const bench = common.createBenchmark(main, { n: [1e3], nheaders: [0, 10, 100, 1000], -}, { flags: ['--expose-http2', '--no-warnings'] }); +}, { flags: ['--no-warnings'] }); function main(conf) { const n = +conf.n; diff --git a/benchmark/http2/respond-with-fd.js b/benchmark/http2/respond-with-fd.js index 2c4c767a96..a235bd87d5 100644 --- a/benchmark/http2/respond-with-fd.js +++ b/benchmark/http2/respond-with-fd.js @@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, { requests: [100, 1000, 10000, 100000, 1000000], streams: [100, 200, 1000], clients: [1, 2] -}, { flags: ['--expose-http2', '--no-warnings'] }); +}, { flags: ['--no-warnings'] }); function main(conf) { diff --git a/benchmark/http2/simple.js b/benchmark/http2/simple.js index d0674fd952..8d7767197b 100644 --- a/benchmark/http2/simple.js +++ b/benchmark/http2/simple.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { requests: [100, 1000, 10000, 100000], streams: [100, 200, 1000], clients: [1, 2] -}, { flags: ['--expose-http2', '--no-warnings'] }); +}, { flags: ['--no-warnings'] }); function main(conf) { const n = +conf.requests; diff --git a/benchmark/http2/write.js b/benchmark/http2/write.js index 03fe128c6b..bee1c1b351 100644 --- a/benchmark/http2/write.js +++ b/benchmark/http2/write.js @@ -6,7 +6,7 @@ const PORT = common.PORT; const bench = common.createBenchmark(main, { streams: [100, 200, 1000], length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024], -}, { flags: ['--expose-http2', '--no-warnings'] }); +}, { flags: ['--no-warnings'] }); function main(conf) { const m = +conf.streams; diff --git a/doc/api/cli.md b/doc/api/cli.md index b2e5afabca..4b2f78d94a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -175,13 +175,6 @@ added: v6.0.0 Silence all process warnings (including deprecations). -### `--expose-http2` - - -Enable the experimental `'http2'` module. - ### `--abort-on-uncaught-exception`