lib: deprecate _http_*

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58535
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
Sebastian Beltran authored and GitHub committed 2026-10-15 00:52:34 +00:00
1 parent e39f2e8cff
commit 12ce81920a
51 files changed
+6254 -5892

No files matched your search

+5 -2
View File
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common.js');
const _checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar;
const groupedInputs = {
// Representative set of inputs from an AcmeAir benchmark run:
@@ -51,9 +50,13 @@ const inputs = [
const bench = common.createBenchmark(main, {
input: inputs.concat(Object.keys(groupedInputs)),
n: [1e6],
}, {
flags: ['--expose-internals', '--no-warnings'],
});
function main({ n, input }) {
const checkInvalidHeaderChar = require('internal/http/common')._checkInvalidHeaderChar;
let inputs = [input];
if (Object.hasOwn(groupedInputs, input)) {
inputs = groupedInputs[input];
@@ -62,7 +65,7 @@ function main({ n, input }) {
const len = inputs.length;
bench.start();
for (let i = 0; i < n; i++) {
_checkInvalidHeaderChar(inputs[i % len]);
checkInvalidHeaderChar(inputs[i % len]);
}
bench.end(n);
}
+5 -2
View File
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common.js');
const _checkIsHttpToken = require('_http_common')._checkIsHttpToken;
const bench = common.createBenchmark(main, {
key: [
@@ -38,12 +37,16 @@ const bench = common.createBenchmark(main, {
'alternate-protocol:', // slow bailout
],
n: [1e6],
}, {
flags: ['--expose-internals', '--no-warnings'],
});
function main({ n, key }) {
const checkIsHttpToken = require('internal/http/common')._checkIsHttpToken;
bench.start();
for (let i = 0; i < n; i++) {
_checkIsHttpToken(key);
checkIsHttpToken(key);
}
bench.end(n);
}
+1 -1
View File
@@ -1,7 +1,7 @@
'use strict';
const common = require('../common.js');
const { OutgoingMessage } = require('_http_outgoing');
const { OutgoingMessage } = require('http');
const bench = common.createBenchmark(main, {
value: [