mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
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 <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
ba3be578d8
commit
ac59dc42ed
39 changed files with 99 additions and 8657 deletions
|
@ -3,7 +3,6 @@
|
|||
'use strict';
|
||||
const common = require('../common');
|
||||
const { internalBinding } = require('internal/test/binding');
|
||||
const { getOptionValue } = require('internal/options');
|
||||
|
||||
// Monkey patch before requiring anything
|
||||
class DummyParser {
|
||||
|
@ -16,9 +15,7 @@ class DummyParser {
|
|||
}
|
||||
DummyParser.REQUEST = Symbol();
|
||||
|
||||
const binding =
|
||||
getOptionValue('--http-parser') === 'legacy' ?
|
||||
internalBinding('http_parser') : internalBinding('http_parser_llhttp');
|
||||
const binding = internalBinding('http_parser');
|
||||
binding.HTTPParser = DummyParser;
|
||||
|
||||
const assert = require('assert');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue