From aa943d098e0299ea87485a607353d152f5ea5012 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 --- node.gypi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'node.gypi') diff --git a/node.gypi b/node.gypi index 665fc627b3..4bfaa01ff3 100644 --- a/node.gypi +++ b/node.gypi @@ -164,12 +164,14 @@ }], [ 'node_experimental_http_parser=="true"', { - 'defines': [ 'NODE_EXPERIMENTAL_HTTP' ], - 'dependencies': [ 'deps/llhttp/llhttp.gyp:llhttp' ], - }, { - 'conditions': [ [ 'node_shared_http_parser=="false"', { - 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ], - } ] ], + 'defines': [ 'NODE_EXPERIMENTAL_HTTP_DEFAULT' ], + } ], + + [ 'node_shared_http_parser=="false"', { + 'dependencies': [ + 'deps/http_parser/http_parser.gyp:http_parser', + 'deps/llhttp/llhttp.gyp:llhttp' + ], } ], [ 'node_shared_cares=="false"', { -- cgit v1.2.3