Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-11-30 09:39:02 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2018-12-07 15:32:49 +0300
commitc8d5e31db43fb46f1d2db79e015d909c6a702eef (patch)
treeeac3677ba38d89bffb2e28a2c6b7f9c31ae524c8 /doc
parenta22ac0bb667d0f71fc2599ed236df99bde8cf109 (diff)
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 <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/cli.md16
-rw-r--r--doc/node.16
2 files changed, 22 insertions, 0 deletions
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`
+<!-- YAML
+added: REPLACEME
+-->
+
+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`
<!-- YAML
added: v0.11.15
diff --git a/doc/node.1 b/doc/node.1
index e911bac47ef..7695c2011e3 100644
--- a/doc/node.1
+++ b/doc/node.1
@@ -97,6 +97,12 @@ Enable experimental ES module support in VM module.
.It Fl -experimental-worker
Enable experimental worker threads using worker_threads module.
.
+.It Fl -http-parser Ns = Ns Ar library
+Chooses an HTTP parser library. Available values are
+.Sy llhttp
+or
+.Sy legacy .
+.
.It Fl -force-fips
Force FIPS-compliant crypto on startup
(Cannot be disabled from script code).