diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-11-30 07:39:02 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-12-06 05:21:36 +0100 |
commit | aa943d098e0299ea87485a607353d152f5ea5012 (patch) | |
tree | b3f2cd52efc4568d5f7deb6ca99684e2f5d22a62 /test/parallel/test-http-parser-bad-ref.js | |
parent | 7bcbf044ddc864be9d6c711a75f3a33b6a3c652e (diff) | |
download | android-node-v8-aa943d098e0299ea87485a607353d152f5ea5012.tar.gz android-node-v8-aa943d098e0299ea87485a607353d152f5ea5012.tar.bz2 android-node-v8-aa943d098e0299ea87485a607353d152f5ea5012.zip |
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 'test/parallel/test-http-parser-bad-ref.js')
-rw-r--r-- | test/parallel/test-http-parser-bad-ref.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parallel/test-http-parser-bad-ref.js b/test/parallel/test-http-parser-bad-ref.js index 5b002b2ce0..0b132d69a2 100644 --- a/test/parallel/test-http-parser-bad-ref.js +++ b/test/parallel/test-http-parser-bad-ref.js @@ -2,12 +2,11 @@ // Run this program with valgrind or efence with --expose_gc to expose the // problem. -// Flags: --expose_gc --expose-internals +// Flags: --expose_gc require('../common'); const assert = require('assert'); -const { internalBinding } = require('internal/test/binding'); -const { HTTPParser } = internalBinding('http_parser'); +const { HTTPParser } = require('_http_common'); const kOnHeaders = HTTPParser.kOnHeaders | 0; const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0; |