From ac59dc42edb721ede2e5ddc6d1e4945ee2bf1e9c Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 17 Sep 2019 14:17:08 +0200 Subject: http: remove legacy parser Remove the legacy `http_parser` implementation as a dependency and all code that uses it in favor of llhttp, given that the latter has been the default for all of Node 12 with no outstanding issues. PR-URL: https://github.com/nodejs/node/pull/29589 Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Jiawen Geng Reviewed-By: Ruben Bridgewater Reviewed-By: Minwoo Jung Reviewed-By: Trivikram Kamat --- src/node_options.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/node_options.cc') diff --git a/src/node_options.cc b/src/node_options.cc index 286218fb19..8a88902513 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -154,10 +154,6 @@ void EnvironmentOptions::CheckOptions(std::vector* errors) { errors->push_back("either --check or --eval can be used, not both"); } - if (http_parser != "legacy" && http_parser != "llhttp") { - errors->push_back("invalid value for --http-parser"); - } - if (!unhandled_rejections.empty() && unhandled_rejections != "strict" && unhandled_rejections != "warn" && @@ -362,11 +358,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "Generate heap snapshot on specified signal", &EnvironmentOptions::heap_snapshot_signal, kAllowedInEnvironment); - AddOption("--http-parser", - "Select which HTTP parser to use; either 'legacy' or 'llhttp' " - "(default: llhttp).", - &EnvironmentOptions::http_parser, - kAllowedInEnvironment); + AddOption("--http-parser", "", NoOp{}, kAllowedInEnvironment); AddOption("--input-type", "set module type for string input", &EnvironmentOptions::module_type, -- cgit v1.2.3