From c8d5e31db43fb46f1d2db79e015d909c6a702eef Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 30 Nov 2018 07:39:02 +0100 Subject: http: make parser choice a runtime flag Add a `--http-parser=llhttp` vs `--http-parser=traditional` command line switch, to make testing and comparing the new llhttp-based implementation easier. PR-URL: https://github.com/nodejs/node/pull/24739 Refs: https://github.com/nodejs/node/issues/24730 Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: Fedor Indutny Reviewed-By: Gus Caplan Reviewed-By: Matheus Marchini Reviewed-By: Matteo Collina Reviewed-By: Ali Ijaz Sheikh --- doc/api/cli.md | 16 ++++++++++++++++ doc/node.1 | 6 ++++++ 2 files changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/api/cli.md b/doc/api/cli.md index 09a5364bf8c..1be3bb85269 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -119,6 +119,22 @@ added: v6.0.0 Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.) (Same requirements as `--enable-fips`.) +### `--http-parser=library` + + +Chooses an HTTP parser library. Available values are: + +- `llhttp` for https://llhttp.org/ +- `legacy` for https://github.com/nodejs/http-parser + +The default is `legacy`, unless otherwise specified when building Node.js. + +This flag exists to aid in experimentation with the internal implementation of +the Node.js http parser. +This flag is likely to become a no-op and removed at some point in the future. + ### `--icu-data-dir=file`